code: def get_tree(cls, parent=None):
          
          cls = get_result_class(cls)
  
          if parent is None:
              # return the entire tree
              return cls.objects.all()
          if parent.is_leaf():
              return cls.objects.filter(pk=parent.pk)
          return cls.objects.filter(
              path__startswith=parent.path,
              depth__gte=parent.depth
          ).order_by(
              'path'
          )
docs: :returns:
  
              A *queryset* of nodes ordered as DFS, including the parent.
              If no parent is given, the entire tree is returned.