public static List<Module> getValidModules(Project project) {
    final Module[] modules = ModuleManager.getInstance(project).getModules();
    List<Module> result = new ArrayList<>();
    for (Module module : modules) {
      if (PythonSdkUtil.findPythonSdk(module) != null) {
        result.add(module);
      }
    }
    return result;
  }
public static List<Module> getValidModules(Project project)