public static <K, V> PersistentHashMap<K, V> canonicalize(final @NotNull PersistentHashMap<K, V> originalMap,
                                                            final @NotNull /* @OutParam */ PersistentHashMap<K, V> targetCanonicalMap,
                                                            final @NotNull Function<? super List<K>, ? extends List<K>> stableKeysSorter,
                                                            final @NotNull Function<? super V, ? extends V> valueCanonicalizer) throws IOException {
    PersistentMapBase.canonicalize(
      originalMap.myImpl,
      targetCanonicalMap.myImpl,
      stableKeysSorter,
      valueCanonicalizer
    );
    return targetCanonicalMap;
  }
public static <K, V> PersistentHashMap<K, V> canonicalize(final @NotNull PersistentHashMap<K, V> originalMap,
                                                            final @NotNull /* @OutParam */ PersistentHashMap<K, V> targetCanonicalMap,
                                                            final @NotNull Function<? super List<K>, ? extends List<K>> stableKeysSorter,
                                                            final @NotNull Function<? super V, ? extends V> valueCanonicalizer)