def visit_all_nodes(graph):
    'Visit all nodes visits each node on a graph'
    nodes = graph.node_names
    for node in nodes:
        graph.move_to_node(node)
Visit all nodes visits each node on a graph
def visit_all_nodes(graph):
    
    nodes = graph.node_names
    for node in nodes:
        graph.move_to_node(node)