OnExit of SubGraphs

There is any way to run a node when exiting a subgraph? A kind of “OnExit” of Subgraphs?
I have many subgraphs as states, and when I am changing between them, some time I would like to run some logic and make some “cleanup”.

Not at the moment, but you can put a node after the run subgraph node which should operate after, and you could do cleanup there. Will that work?

It is actualy what I’m doing right now. Another “OnStart” with a repeat with condition to run and do what I need.