get edge_list from a graph