public static @NotNull List<TreePath> collectExpandedPaths(@NotNull JTree tree, @NotNull TreePath root) {
    return collectExpandedObjects(tree, root, Function.identity());
  }
public static @NotNull List<TreePath> collectExpandedPaths(@NotNull JTree tree, @NotNull TreePath root)