def lineage(self: Tree) -> tuple[Tree, ...]:
        """All parent nodes and their parent nodes, starting with the closest."""
        from warnings import warn

        warn(
            "`lineage` has been deprecated, and in the future will raise an error."
            "Please use `parents` from now on.",
            DeprecationWarning,
            stacklevel=2,
        )
        return self.iter_lineage()
All parent nodes and their parent nodes, starting with the closest.
xarray/core/treenode.py