private static @NotNull CancellablePromise<ArrayList<PackageSet>> computeSelection(
    Invoker invoker,
    ArrayList<PackageDependenciesNode> nodes,
    PatternDialectProvider provider,
    boolean recursively
  ) {
    return invoker.compute(() -> {
      final ArrayList<PackageSet> result = new ArrayList<>();
      for (PackageDependenciesNode node : nodes) {
        final PackageSet set = provider.createPackageSet(node, recursively);
        if (set != null) {
          result.add(set);
        }
      }
      return result;
    });
  }
private static @NotNull CancellablePromise<ArrayList<PackageSet>> computeSelection(
    Invoker invoker,
    ArrayList<PackageDependenciesNode> nodes,
    PatternDialectProvider provider,
    boolean recursively
  )