@ApiStatus.Internal
  public static Path guessUltimateHome(Class<?> klass) {
    String ultimateHomePathOverride = System.getProperty(INTELLIJ_BUILD_ULTIMATE_HOME_PATH);
    if (ultimateHomePathOverride != null) {
      Path path = Paths.get(ultimateHomePathOverride);
      if (!path.toFile().exists()) {
        throw new IllegalArgumentException("Ultimate home path: '" + path
                                           + "' passed via system property: '" + INTELLIJ_BUILD_ULTIMATE_HOME_PATH + " not exists");
      }
      return path;
    }
    final Path start = getSomeRoot(klass);
    Path home = start;
    while (home != null) {
      if (Files.exists(home.resolve(ULTIMATE_REPO_MARKER_FILE))) {
        return home;
      }
      home = home.getParent();
    }

    throw new IllegalArgumentException("Cannot guess ultimate project home from root '" + start + "'" +
                                       ", marker file '" + ULTIMATE_REPO_MARKER_FILE + "'");
  }
@ApiStatus.Internal
  public static Path guessUltimateHome(Class<?> klass)