Copies a subgraph from `graph` to `output` by performing a reverse DFS starting at nodes in vector `stack`. `node_map` is a vector indexed by source node ID to dest nodes. Does not traverse into nodes in `node_map`, so by adding nodes to `node_map` before the traversal clients can cut the graph. If a frame is provided (frame != nullptr), then this functions will return an error if the traversal le
source not stored for this graph (policy: none)