@Override
  public final void save(@NotNull DataOutput out,
                         @NotNull Map<StubIndexKey<?, ?>, Map<Object, StubIdList>> indexedStubs) throws IOException {
    DataInputOutputUtil.writeINT(out, indexedStubs.size());
    if (!indexedStubs.isEmpty()) {
      final StubKeySerializationState stubKeySerializationState = createStubIndexKeySerializationState(out, indexedStubs.keySet());

      final Iterable<StubIndexKey<?, ?>> keysToStore = useStableBinaryFormat ? indexedStubs.keySet().stream().sorted(Comparator.comparing(StubIndexKey::getName)).toList()
                                                                             : indexedStubs.keySet();
      for (StubIndexKey stubIndexKey : keysToStore) {
        writeStubIndexKey(out, stubIndexKey, stubKeySerializationState);
        Map<Object, StubIdList> map = indexedStubs.get(stubIndexKey);
        serializeIndexValue(out, stubIndexKey, map);
      }
    }
  }
@Override
  public final void save(@NotNull DataOutput out,
                         @NotNull Map<StubIndexKey<?, ?>, Map<Object, StubIdList>> indexedStubs)