static <V, T extends Tree<V, T>> MSeq<T> pathElementsFromRoot(
		final T node,
		final int depth
	) {
		final MSeq<T> path;
		if (node == null) {
			path = MSeq.ofLength(depth);
		} else {
			path = pathElementsFromRoot(
				node.parent().orElse(null),
				depth + 1
			);
			path.set(path.length() - depth - 1, node);
		}

		return path;
	}
Builds the parents of node up to and including the root node, where the
original node is the last element in the returned array. The length of
the returned array gives the node's depth in the tree.

@param node the node to get the path for
@param depth  an int giving the number of steps already taken towards
       the root (on recursive calls), used to size the returned array
@return an array of nodes giving the path from the root to the specified
        node
jenetics.ext/src/main/java/io/jenetics/ext/util/Trees.java