code: def _eliminate_leafs(self, graph):
          
          result = []
          idset = set([id(x) for x in graph])
          for n in graph:
              refset = set([id(x) for x in get_referents(n)])
              if refset.intersection(idset):
                  result.append(n)
          return result
docs: Eliminate leaf objects - that are objects not referencing any other
          objects in the list `graph`. Returns the list of objects without the
          objects identified as leafs.