docs: public static <K, E, V> Collector<E, Map<K, V>, ImmutableMap<K, V>> uniqueIndex(Function<? super E, K> keyFunction,
      Function<? super E, V> valueFunction, int expectedSize) {
      verifyKeyAndValueFunctions(keyFunction, valueFunction);
  
      BiConsumer<Map<K, V>, E> accumulator = (map, element) -> {
        K key = requireNonNull(keyFunction.apply(element), KEY_FUNCTION_CANT_RETURN_NULL_MESSAGE);
        V value = requireNonNull(valueFunction.apply(element), VALUE_FUNCTION_CANT_RETURN_NULL_MESSAGE);
  
        putAndFailOnDuplicateKey(map, key, value);
      };
      BinaryOperator<Map<K, V>> merger = (m1, m2) -> {
        for (Map.Entry<K, V> entry : m2.entrySet()) {
          putAndFailOnDuplicateKey(m1, entry.getKey(), entry.getValue());
        }
        return m1;
      };
      return Collector.of(
        newHashMapSupplier(expectedSize),
        accumulator,
        merger,
        ImmutableMap::copyOf,
        Collector.Characteristics.UNORDERED);
    }