nodes_from_graph function

Extract Nodes from Graph