How to impose average velocity inlet condition?

Maybe this is a bit a silly question, but does this code apply to taking the normal to a certain facet?
I saw a previous code based on approximating the normal at every degree of freedom and represent it with a projection; Obtain velocity normal to boundary - #4 by charithjeewantha
Right now I try to take such a velocity inlet condition and try to multiply the solution by the normal vector. For my case, I have a 3D geometry were the normal should be taken to the inlet facet. Is the code in the link an example of how to solve such a problem in dolfinx (rather than the old dolfin version)?