public static @NotNull <T> Map<T, IntSet> groupByAsIntSet(@NotNull IntCollection collection, @NotNull IntFunction<? extends T> function) {
    Map<T, IntSet> result = new HashMap<>();
    collection.forEach((IntConsumer)(it) -> {
      T key = function.apply(it);
      IntSet values = result.computeIfAbsent(key, __ -> new IntOpenHashSet());
      values.add(it);
    });
    return result;
  }
public static @NotNull <T> Map<T, IntSet> groupByAsIntSet(@NotNull IntCollection collection, @NotNull IntFunction<? extends T> function)