networkx get edges with attributes