docs: def add_edge(self, u, v, **kwargs):
          """
          Add an edge between u and v.
  
          The nodes u and v will be automatically added if they are
          not already in the graph
  
          Parameters
          ----------
          u,v : nodes
              Nodes can be any hashable Python object.
  
          Examples
          --------
          >>> from pgmpy.models import MarkovModel
          >>> G = MarkovModel()
          >>> G.add_nodes_from(['Alice', 'Bob', 'Charles'])
          >>> G.add_edge('Alice', 'Bob')
          """
          # check that there is no self loop.
          if u != v:
              super(MarkovModel, self).add_edge(u, v, **kwargs)
          else:
              raise ValueError('Self loops are not allowed')