code: public static <T> List<T> toParent(TreeDef.Parented<T> treeDef, T node, T parent) {
  		List<T> list = new ArrayList<>();
  		T tip = node;
  		while (true) {
  			list.add(tip);
  			tip = treeDef.parentOf(tip);
  			if (tip == null) {
  				throw new IllegalArgumentException(parent + " is not a parent of " + node);
  			} else if (tip.equals(parent)) {
  				list.add(parent);
  				return list;
  			}
  		}
  	}
docs: Creates a mutable list whose first element is {@code node}, and last element is {@code parent}.
  @throws IllegalArgumentException if {@code parent} is not a parent of {@code node}