private static @NotNull Pair<Boolean, List<String>> validateFramework(@NotNull PyFrameworkProjectGenerator generator, @NotNull Sdk sdk) {
    final List<String> warnings = new ArrayList<>();
    boolean installFramework = false;
    if (!generator.isFrameworkInstalled(sdk)) {
      final String frameworkName = generator.getFrameworkTitle();
      String message = PyBundle.message("python.package.installation.notification.message", frameworkName);
      if (PyPackageUtil.packageManagementEnabled(sdk, false, false)) {
        installFramework = true;
        final List<PyPackage> packages = PyPackageUtil.refreshAndGetPackagesModally(sdk);
        if (!PyPackageUtil.hasManagement(packages)) {
          message = PyBundle.message("python.package.and.packaging.tools.installation.notification.message", frameworkName);
        }
      }
      warnings.add(message);
    }
    return Pair.create(installFramework, warnings);
  }
private static @NotNull Pair<Boolean, List<String>> validateFramework(@NotNull PyFrameworkProjectGenerator generator, @NotNull Sdk sdk)