code: def move(self, target, pos=None):
          
  
          pos = self._prepare_pos_var_for_move(pos)
  
          sib_order = None
          parent = None
  
          if pos in ('first-child', 'last-child', 'sorted-child'):
              # moving to a child
              if not target.is_leaf():
                  target = target.get_last_child()
                  pos = {'first-child': 'first-sibling',
                         'last-child': 'last-sibling',
                         'sorted-child': 'sorted-sibling'}[pos]
              else:
                  parent = target
                  if pos == 'sorted-child':
                      pos = 'sorted-sibling'
                  else:
                      pos = 'first-sibling'
                      sib_order = 1
  
          if target.is_descendant_of(self):
              raise InvalidMoveToDescendant(
                  _("Can't move node to a descendant."))
  
          if self == target and (
              (pos == 'left') or
              (pos in ('right', 'last-sibling') and
               target == target.get_last_sibling()) or
              (pos == 'first-sibling' and
               target == target.get_first_sibling())):
              # special cases, not actually moving the node so no need to UPDATE
              return
  
          if pos == 'sorted-sibling':
              if parent:
                  self.parent = parent
              else:
                  self.parent = target.parent
          else:
              if sib_order:
                  self.sib_order = sib_order
              else:
                  self.sib_order = self.__class__._get_new_sibling_order(pos,
                                                                         target)
              if parent:
                  self.parent = parent
              else:
                  self.parent = target.parent
  
          self.save()
docs: Moves the current node and all it's descendants to a new position
          relative to another node.