@Override
  public void annotate(@NotNull PsiElement element, @NotNull AnnotationHolder holder) {

    final Project project = element.getProject();
    if (getSettings(project).shown) {
      return;
    }

    if (element instanceof PyFile pyFile) {

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

      if (PyCellUtil.hasCells(pyFile)) {
        showInspectionAdvertisement(project,
                                    PyCharmCommunityCustomizationBundle.message("pro.advertiser.notification.title.cells.in.editor"),
                                    "https://www.jetbrains.com/pycharm/features/scientific_tools.html", "codecells");
      }

      if (PyPsiUtils.containsImport(pyFile, "django")) {
        showInspectionAdvertisement(project,
                                    PyCharmCommunityCustomizationBundle.message("pro.advertiser.notification.title.django.framework"),
                                    "https://www.jetbrains.com/pycharm/features/web_development.html#django", "django");
      }

      if (PyPsiUtils.containsImport(pyFile, "flask")) {
        showInspectionAdvertisement(project,
                                    PyCharmCommunityCustomizationBundle.message("pro.advertiser.notification.title.flask.framework"),
                                    null, "flask");
      }

      if (PyPsiUtils.containsImport(pyFile, "pyramid")) {
        showInspectionAdvertisement(project,
                                    PyCharmCommunityCustomizationBundle.message("pro.advertiser.notification.title.pyramid.framework"),
                                    null, "pyramid");
      }
    }

    if (isJupyterFile(element)) {
      showInspectionAdvertisement(element.getProject(),
                                  PyCharmCommunityCustomizationBundle.message("pro.advertiser.notification.title.jupyter.notebook"),
                                  "https://www.jetbrains.com/pycharm/features/scientific_tools.html", "jupyter");
    }
  }
@Override
  public void annotate(@NotNull PsiElement element, @NotNull AnnotationHolder holder)