@NotNull
  public static Map<String, FileBasedIndexVersionInfo> fileBasedIndexVersions(
    @NotNull List<? extends FileBasedIndexExtension<?, ?>> fileBasedIndexExtensions,
    @NotNull Function<? super FileBasedIndexExtension<?, ?>, String> versionExtractor
  ) {
    var builder = new HashMap<String, FileBasedIndexVersionInfo>();
    for (FileBasedIndexExtension<?, ?> extension : fileBasedIndexExtensions) {

      ID<?, ?> indexId = extension.getName();
      String name = indexId.getName();
      var newValue = new FileBasedIndexVersionInfo(
        versionExtractor.fun(extension),
        extension.needsForwardIndexWhenSharing()
      );

      var oldValue = builder.put(name, newValue);

      if (oldValue != null && !oldValue.equals(newValue)) {
        LOG.warn("Multiple declarations of the same file based index: " + name + ", old value " + oldValue + ", new value: " + newValue);
      }
    }
    return builder;
  }
@NotNull
  public static Map<String, FileBasedIndexVersionInfo> fileBasedIndexVersions(
    @NotNull List<? extends FileBasedIndexExtension<?, ?>> fileBasedIndexExtensions,
    @NotNull Function<? super FileBasedIndexExtension<?, ?>, String> versionExtractor
  )