@Override
  public @NotNull <Data> Gist<Data> newGist(@NotNull String id,
                                            int version,
                                            @NotNull DataExternalizer<Data> externalizer) {
    @SuppressWarnings("unchecked")
    GistImpl<Data> gist = (GistImpl<Data>)knownGists.computeIfAbsent(
      id,
      __ -> new GistImpl<>(id, version, externalizer)
    );

    if (gist.version() != version) {
      throw new IllegalArgumentException("Gist[" + id + "] already exists, but with version(=" + gist.version() + ") != " + version);
    }
    if (gist.externalizer() != externalizer) {
      throw new IllegalArgumentException(
        "Gist[" + id + "] already exists, but with externalizer(=" + gist.externalizer() + ") != " + externalizer);
    }
    return gist;
  }
@Override
  public @NotNull <Data> Gist<Data> newGist(@NotNull String id,
                                            int version,
                                            @NotNull DataExternalizer<Data> externalizer)