code: def add_edge(self, fr, to):
          
          if fr not in set(self.graph.vs):  # ToDo: find out why item can be in set but not dict
              raise ValueError('can not connect unknown vertices in n-partite graphs, {!r} missing'.format(fr))
          elif to not in set(self.graph.vs):
              raise ValueError('can not connect unknown vertices in n-partite graphs, {!r} missing'.format(to))
          self.graph.add_edge(fr, to)
docs: Add an outward edge to a vertex
  
          :param fr: The source vertex.
          :param to: The name of the outward edge.