docs: def _detach_children(self):
          """Remove all children and give them independent parent copies."""
          children = [val[0] for val in self._children.values()]
          for child in children:
              child()._parent = list(self)
          self._children.clear()