private static Path getSomeRoot(Class<?> klass) {
    // Under jps-bootstrap home is already known, reuse it
    String communityHome = System.getenv(JPS_BOOTSTRAP_COMMUNITY_HOME_ENV_NAME);
    if (communityHome != null) {
      return Path.of(communityHome).normalize();
    }

    var path = getPathFromClass(klass);
    if (!path.toString().endsWith("class")) {
      throw new IllegalArgumentException(
        String.format("To guess idea home, you must provide class that resides in .class file inside of idea home dir. " +
                      "But provided %s resides in %s", klass, path));
    }
    return path;
  }
private static Path getSomeRoot(Class<?> klass)