def _copy_node(
        self, inherit: bool, deep: bool = False, memo: dict[int, Any] | None = None
    ) -> Self:
        """Copy just one node of a tree"""
        new_empty_node = type(self)()
        return new_empty_node
Copy just one node of a tree
xarray/core/treenode.py