add_cycle function

Add a cycle of nodes to the graph