private String guessExistingEmbedderDir(@NotNull String multiModuleProjectDirectory) {
    var dir = multiModuleProjectDirectory;
    if (dir.isBlank()) {
      MavenLog.LOG.warn("Maven project directory is blank. Using project base path");
      dir = myProject.getBasePath();
    }
    if (null == dir || dir.isBlank()) {
      MavenLog.LOG.warn("Maven project directory is blank. Using tmp dir");
      dir = System.getProperty("java.io.tmpdir");
    }
    Path originalPath = Path.of(dir).toAbsolutePath();
    Path path = originalPath;
    while (null != path && !Files.exists(path)) {
      MavenLog.LOG.warn(String.format("Maven project %s directory does not exist. Using parent", path));
      path = path.getParent();
    }
    if (null == path) {
      MavenLog.LOG.warn("Could not determine maven project directory: " + multiModuleProjectDirectory);
      return originalPath.toString();
    }
    return path.toString();
  }
private String guessExistingEmbedderDir(@NotNull String multiModuleProjectDirectory)