def edge_label(self, edge): """ overrides the edge_label function of digraph, to maintain the nodes mapping @type edge: (node1,node2) @type node1: Node @param node2: origin of new edge @type node2: Node @param node2: destination of new edge """ node1, node2 = edge if isinstance(node1, Node): return digraph.edge_label(self, edge=(node1.uid, node2.uid)) else: return digraph.edge_label(self, edge)