code: def prepare_delete_monarchy(self, node, position=None, save=True):
          
          # We are going to iterate all children, even though the first child is
          # treated in a special way, because the query iterator may be custom, so
          # we will avoid using slicing children[0] and children[1:].
          first = None
          for child in node.children.all():
              if first is None:
                  first = child
                  first.move(node.parent, position, save)
              else:
                  child.move(first, position, save)
docs: Prepares a given :class:`CTENode` `node` for deletion, by executing
              the :const:`DELETE_METHOD_MONARCHY` semantics. Descendant nodes,
              if present, will be moved; in this case the optional `position` can
              be a ``callable`` which is invoked prior to each move operation (see
              :meth:`move` for details).
  
              By default, after each move operation, sub-tree nodes which were
              moved will be saved through a call to :meth:`Model.save` unless
              `save` is ``False``.
  
              This method delegates move operations to :meth:`move`.
  
              :param node: the :class:`CTENode` to prepare for deletion.
  
              :param position: optionally, a ``callable`` to invoke prior to each
                  move operation.
  
              :param save: flag indicating whether to save after each move
                  operation, ``True`` by default.