private void checkPackagesHaveBeenInstalled(@NotNull PsiElement file, @Nullable Module module) {
      if (module != null && !isRunningPackagingTasks(module)) {
        final Sdk sdk = PythonSdkUtil.findPythonSdk(module);
        if (sdk != null) {
          final List<PyRequirement> unsatisfied = findUnsatisfiedRequirements(module, sdk, myIgnoredPackages);
          if (unsatisfied != null && !unsatisfied.isEmpty()) {
            @NlsSafe String requirementsList = PyPackageUtil.requirementsToString(unsatisfied);
            @InspectionMessage String msg = PyPsiBundle.message("INSP.requirements.package.requirements.not.satisfied",
                                                                requirementsList, unsatisfied.size());
            final List<LocalQuickFix> quickFixes = new ArrayList<>();

            Optional<LocalQuickFix> providedFix = PySdkProvider.EP_NAME.getExtensionList().stream()
              .map(ext -> ext.createInstallPackagesQuickFix(module))
              .filter(fix -> fix != null)
              .findFirst();

            if (providedFix.isPresent()) {
              quickFixes.add(providedFix.get());
            }
            else {
              quickFixes.add(new PyInstallRequirementsFix(null, module, sdk, unsatisfied));
            }
            quickFixes.add(new IgnoreRequirementFix(ContainerUtil.map2Set(unsatisfied, PyRequirement::getName)));
            registerProblem(file, msg,
                            ProblemHighlightType.GENERIC_ERROR_OR_WARNING, null,
                            quickFixes.toArray(LocalQuickFix.EMPTY_ARRAY));
          }
        }
      }
    }
private void checkPackagesHaveBeenInstalled(@NotNull PsiElement file, @Nullable Module module)