Greyscale filter / final color modification

How can I apply a grayscale filter to the final color in a URP PBR Shader Graph? By “final color” I mean the color after lighting. In the built-in rendering pipeline I could just add a one-line finalcolor function. But in Shader Graph there does’t seem to be any way to modify the final color.

It’s fine if I have to do this one operation in code but I do not want to write the whole shader by hand because doing that in URP is undocumented and cumbersome to the point where it’s not even an option in any real-world project.

Other people seem to be having a similar problem:
https://forum.unity.com/threads/sprite-renderers-color-property.879424/#post-5782498

You could apply the greyscale filter as a Custom Pass.

https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@7.4/manual/Custom-Pass.html