networkx get edges with weights