add_path function

Add a path of nodes to the graph