def add_edge(self, u, v, **info):
    self.add_node(u)
    self.add_node(v)
    self.edges[u][v] = info
def add_edge(self, u, v, **info):
    self.add_node(u)
    self.add_node(v)
    self.edges[u][v] = info