code: def get_parent(self, update=False):
          
          depth = int(len(self.path) / self.steplen)
          if depth <= 1:
              return
          try:
              if update:
                  del self._cached_parent_obj
              else:
                  return self._cached_parent_obj
          except AttributeError:
              pass
          parentpath = self._get_basepath(self.path, depth - 1)
          self._cached_parent_obj = get_result_class(
              self.__class__).objects.get(path=parentpath)
          return self._cached_parent_obj
docs: :returns: the parent node of the current node object.
              Caches the result in the object itself to help in loops.