select_nodes function

Select nodes in a graph