private static @NotNull Map<@NotNull Module, @NotNull Sdk> getPythonModuleSdks(@NotNull Project project) {
    ModuleManager moduleManager = ModuleManager.Companion.getInstanceIfDefined(project);
    if (moduleManager == null) {
      return Collections.emptyMap();
    }

    final Map<Module, Sdk> result = new LinkedHashMap<>();
    for (Module module : moduleManager.getModules()) {
      Sdk sdk = PythonSdkUtil.findPythonSdk(module);
      if (sdk != null) {
        result.put(module, sdk);
      }
    }
    return result;
  }
private static @NotNull Map<@NotNull Module, @NotNull Sdk> getPythonModuleSdks(@NotNull Project project)