code: def get_parent(self, update=False):
          
          if self._meta.proxy_for_model:
              # the current node is a proxy model; the returned parent
              # should be the same proxy model, so we need to explicitly
              # fetch it as an instance of that model rather than simply
              # following the 'parent' relation
              if self.parent_id is None:
                  return None
              else:
                  return self.__class__.objects.get(pk=self.parent_id)
          else:
              return self.parent
docs: :returns: the parent node of the current node object.