Returns the array of node names that the material has

I don’t see anything in the Python API documentation that lets you search for a specific node, but I do see a function to get information on a parameter. If your node uses a specific parameter, you could search for it this way.

Here is the link to the page I found this on in case you want to look for any other useful functions:
https://dev.epicgames.com/documentation/en-us/unreal-engine/python-api/class/MaterialInterface?application_version=4.27#unreal.MaterialInterface

Alternatively, I’m seeing some potential here:
https://dev.epicgames.com/documentation/en-us/unreal-engine/python-api/class/MaterialEditingLibrary?highlight=get%20materialexpression&application_version=4.27

None of these functions directly returns a specific material function, but you may still be able to get some results. For instance, I can see a method where you use the get_inputs_for_material_expression, and if it returns null, then your material does not contain the expression. However, it looks like this method requires an active material editor, so you would first have to code the material graph opening up.