How to remove nodes from a graph in editor?

Hi,
I would like to remove all unreachable nodes from a graph but all I see in the doc is an “AddNode” function, which doesn’t even seem to exist, and removal is not there at all.

Thanks