@Override
  public void annotate(@NotNull PsiElement element, @NotNull AnnotationHolder holder) {
    if (element instanceof PyFile pyFile) {

      final Project project = element.getProject();

      final VirtualFile vFile = pyFile.getVirtualFile();
      if (vFile != null && FileIndexFacade.getInstance(project).isInLibraryClasses(vFile)) {
        return;
      }

      final Boolean showingFlag = project.getUserData(DONT_SHOW_BALLOON);
      if (showingFlag != null && showingFlag.booleanValue()) {
        return;
      }

      if (!moduleUsesPythonSdk(pyFile)) {
        return;
      }

      final int inspectionVersion = getSettings(project).version;
      if (inspectionVersion < PyCompatibilityInspection.LATEST_INSPECTION_VERSION) {
        if (isCompatibilityInspectionEnabled(element)) {
          final LanguageLevel pyVersion = getLatestConfiguredCompatiblePython3Version(element);
          if (pyVersion != null && pyVersion.isOlderThan(LanguageLevel.getLatest())) {
            showStalePython3VersionWarning(pyFile, project, pyVersion);
          }
        }
        else if (containsFutureImports(pyFile)) {
          showSingletonNotification(
            project, PyBundle.message("python.compatibility.inspection.advertiser.using.future.imports.warning.message"));
        }
        else if (PyPsiUtils.containsImport(pyFile, "six")) {
          showSingletonNotification(
            project, PyBundle.message("python.compatibility.inspection.advertiser.using.six.warning.message"));
        }
      }
    }
  }
@Override
  public void annotate(@NotNull PsiElement element, @NotNull AnnotationHolder holder)