docs: def add_edge(self, u, v, **attr):
          """
          Add an edge between vertices u and v and update edge attributes
          """
          if u not in self.vertices:
              self.vertices[u] = []
          if v not in self.vertices:
              self.vertices[v] = []
          vertex = (u, v)
          self.edges[vertex] = {}
          if attr:
              self.edges[vertex].update(attr)
          self.vertices[u].append(v)
          self.vertices[v].append(u)