code: def get_roots(self, relations=None, prefix=None):
          
          g = self.get_filtered_graph(relations=relations, prefix=prefix)
          # note: we also eliminate any singletons, which includes obsolete classes
          roots = [n for n in g.nodes() if len(list(g.predecessors(n))) == 0 and len(list(g.successors(n))) > 0]
          return roots
docs: Get all nodes that lack parents
  
          Arguments
          ---------
          relations : list[str]
              list of relations used to filter
          prefix : str
              E.g. GO. Exclude nodes that lack this prefix when testing parentage