def __delitem__(self: Tree, key: str) -> None:
        """Remove a child node from this tree object."""
        if key in self.children:
            child = self._children[key]
            del self._children[key]
            child.orphan()
        else:
            raise KeyError(key)
Remove a child node from this tree object.
xarray/core/treenode.py