get_edges function

Get node IDs associated with edges