def zip_subtrees(
    *trees: AnyNamedNode,
) -> Iterator[tuple[AnyNamedNode, ...]]:
    """Zip together subtrees aligned by relative path."""
    for _, nodes in group_subtrees(*trees):
        yield nodes
Zip together subtrees aligned by relative path.
xarray/core/treenode.py