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