private static @NotNull List<Module> collectExternalSystemModules(
    @NotNull Project project,
    @NotNull ProjectSystemId externalSystemId,
    @NotNull String externalProjectPath
  ) {
    List<Module> result = new ArrayList<>();
    for (Module module : ModuleManager.getInstance(project).getModules()) {
      if (ExternalSystemApiUtil.isExternalSystemAwareModule(externalSystemId, module)) {
        String path = ExternalSystemApiUtil.getExternalRootProjectPath(module);
        if (externalProjectPath.equals(path)) {
          result.add(module);
        }
      }
    }
    return result;
  }
private static @NotNull List<Module> collectExternalSystemModules(
    @NotNull Project project,
    @NotNull ProjectSystemId externalSystemId,
    @NotNull String externalProjectPath
  )