@ApiStatus.Internal
  public static BuildDependenciesCommunityRoot guessCommunityHome(Class<?> klass) {
    String communityHomePathOverride = System.getProperty(INTELLIJ_BUILD_COMMUNITY_HOME_PATH);
    if (communityHomePathOverride != null) {
      Path path = Paths.get(communityHomePathOverride);
      if (!path.toFile().exists()) {
        throw new IllegalArgumentException("Community home path: '" + path
                                           + "' passed via system property: '" + INTELLIJ_BUILD_COMMUNITY_HOME_PATH + " not exists");
      }
      return new BuildDependenciesCommunityRoot(path);
    }
    final Path start = getSomeRoot(klass);
    Path home = start;

    while (home != null) {
      if (Files.exists(home.resolve(COMMUNITY_REPO_MARKER_FILE))) {
        return new BuildDependenciesCommunityRoot(home);
      }

      if (Files.exists(home.resolve("community").resolve(COMMUNITY_REPO_MARKER_FILE))) {
        return new BuildDependenciesCommunityRoot(home.resolve("community"));
      }

      home = home.getParent();
    }

    throw new IllegalArgumentException("Cannot guess community project home from root '" + start + "'" +
                                       ", marker file '" + COMMUNITY_REPO_MARKER_FILE + "'");
  }
@ApiStatus.Internal
  public static BuildDependenciesCommunityRoot guessCommunityHome(Class<?> klass)