code: def parent_index(self, relations=None):
          
          g = None
          if relations is None:
              g = self.get_graph()
          else:
              g = self.get_filtered_graph(relations)
          l = []
          for n in g:
              l.append([n] + list(g.predecessors(n)))
          return l
docs: Returns a mapping of nodes to all direct parents
  
          Arguments
          ---------
          relations : list[str]
              list of relations used to filter
  
          Returns:
          list
              list of lists [[CLASS_1, PARENT_1,1, ..., PARENT_1,N], [CLASS_2, PARENT_2,1, PARENT_2,2, ... ] ... ]