Add a general node searching function for any geometric types

as titled
I won't insist on you changing it in this particular case, it's just a general thing for me (I also remember other people commenting in a similar way at the ogs6 dev meeting).
Source code gets changed all the time and this method might be renamed some day or some more code might be added or something and suddenly it might not that obvious anymore.