public static @NotNull Collection<DataNode<?>> findAllRecursively(@NotNull Collection<? extends DataNode<?>> nodes,
                                                                    @Nullable Predicate<? super DataNode<?>> predicate) {
    List<DataNode<?>> result = new ArrayList<>();
    for (DataNode<?> node : nodes) {
      if (predicate == null || predicate.test(node)) {
        result.add(node);
      }
    }
    for (DataNode<?> node : nodes) {
      result.addAll(findAllRecursively(node.getChildren(), predicate));
    }
    return result;
  }
public static @NotNull Collection<DataNode<?>> findAllRecursively(@NotNull Collection<? extends DataNode<?>> nodes,
                                                                    @Nullable Predicate<? super DataNode<?>> predicate)