@Override
  public @Nls String fetchExternalDocumentation(Project project, PsiElement element, List<String> docUrls, boolean onHover) {
    PsiNamedElement namedElement = ApplicationManager.getApplication().runReadAction((Computable<PsiNamedElement>)() -> {
      PsiElement moduleAnchor = element instanceof PsiDirectory ? element : element.getContainingFile();
      final Module module = ModuleUtilCore.findModuleForPsiElement(moduleAnchor);
      if (module != null && !PyDocumentationSettings.getInstance(module).isRenderExternalDocumentation()) return null;

      PsiFileSystemItem file = PythonDocumentationProvider.getFile(element);

      if (file == null) return null;

      if (file instanceof PyiFile) {
        return null;
      }

      return PythonDocumentationProvider.getNamedElement(element);
    });


    if (namedElement != null) {
      final PythonDocumentationMap documentationMap = PythonDocumentationMap.getInstance();
      for (String url : docUrls) {
        Supplier<Document> documentSupplier = Suppliers.memoize(() -> {
          try {
            return Jsoup.parse(new URL(url), 1000);
          }
          catch (IOException e) {
            final String message = "Can't read external doc URL: " + url;
            // Report as errors to EA only URL-induced problems with built-in documentation endpoints
            //noinspection InstanceofCatchParameter
            if ((e instanceof HttpStatusException || e instanceof UnknownHostException) && !documentationMap.isUserDefinedUrl(url)) {
              LOG.error(message, e);
            }
            else {
              LOG.warn(message, e);
            }
            return null;
          }
        });

        for (final PythonDocumentationLinkProvider documentationLinkProvider :
          PythonDocumentationLinkProvider.EP_NAME.getExtensionList()) {
          final String providedUrl = ReadAction.compute(() -> {
            return documentationLinkProvider.getExternalDocumentationUrl(namedElement, namedElement);
          });
          if (!url.equals(providedUrl)) {
            continue;
          }

          Function<Document, @Nls String> quickDocExtractor = documentationLinkProvider.quickDocExtractor(namedElement);

          if (quickDocExtractor != null) {
            final Document document = documentSupplier.get();
            if (document != null) {
              String quickDoc = ReadAction.compute(() -> quickDocExtractor.apply(document));
              if (StringUtil.isNotEmpty(quickDoc)) {
                return quickDoc;
              }
            }
          }
        }
      }
    }

    return null;
  }
@Override
  public @Nls String fetchExternalDocumentation(Project project, PsiElement element, List<String> docUrls, boolean onHover)