docs: def get_local_independencies(self, latex=False):
          """
          Returns all the local independencies present in the markov model.
  
          Local independencies are the independence assertion in the form of
          .. math:: {X \perp W - {X} - MB(X) | MB(X)}
          where MB is the markov blanket of all the random variables in X
  
          Parameters
          ----------
          latex: boolean
              If latex=True then latex string of the indepedence assertion would
              be created
  
          Examples
          --------
          >>> from pgmpy.models import MarkovModel
          >>> mm = MarkovModel()
          >>> mm.add_nodes_from(['x1', 'x2', 'x3', 'x4', 'x5', 'x6', 'x7'])
          >>> mm.add_edges_from([('x1', 'x3'), ('x1', 'x4'), ('x2', 'x4'),
          ...                    ('x2', 'x5'), ('x3', 'x6'), ('x4', 'x6'),
          ...                    ('x4', 'x7'), ('x5', 'x7')])
          >>> mm.get_local_independecies()
          """
          local_independencies = Independencies()
  
          all_vars = set(self.nodes())
          for node in self.nodes():
              markov_blanket = set(self.markov_blanket(node))
              rest = all_vars - set([node]) - markov_blanket
              try:
                  local_independencies.add_assertions([node, list(rest), list(markov_blanket)])
              except ValueError:
                  pass
  
          local_independencies.reduce()
  
          if latex:
              return local_independencies.latex_string()
          else:
              return local_independencies