Programmatically resetting Node and downstream Nodes

How do I programmatically reset not just a single Node (Node.reset()), but all dependent downstream nodes too, as by using the standard node menu reset command?

Class WorkflowManager has resetAndConfigureNode(), which seems to exactly do what is required, but how do I get from a Node object to its WorkflowManager ?