@Override
  @Nullable
  public @Nls String getQuickNavigateInfo(PsiElement element, @NotNull PsiElement originalElement) {
    final PsiElement referenceElement = originalElement.getParent(); // identifier -> expression
    for (PythonDocumentationQuickInfoProvider point : PythonDocumentationQuickInfoProvider.EP_NAME.getExtensions()) {
      final String info = point.getQuickInfo(referenceElement);
      if (info != null) {
        return info;
      }
    }

    final TypeEvalContext context = TypeEvalContext.userInitiated(referenceElement.getProject(), referenceElement.getContainingFile());

    if (element instanceof PyFunction function) {
      final HtmlBuilder result = new HtmlBuilder();

      final PyClass cls = function.getContainingClass();
      if (cls != null) {
        final String clsName = cls.getName();
        if (clsName != null) {
          result.append(styledSpan(PyPsiBundle.message("QDOC.class"), PyHighlighter.PY_KEYWORD));
          result.nbsp();
          result.append(styledSpan(clsName, PyHighlighter.PY_CLASS_DEFINITION));
          result.br();
          // It would be nice to have class import info here, but we don't know the ctrl+hovered reference and context
        }
      }

      return result
        .append(describeDecorators(function, HtmlChunk.text(", ")))
        .append(describeFunction(function, context, true))
        .toString();
    }
    else if (element instanceof PyClass cls) {
      final HtmlBuilder result = new HtmlBuilder();
      return result
        .append(describeDecorators(cls, HtmlChunk.text(", ")))
        .append(describeClass(cls, context))
        .toString();
    }
    else if (element instanceof PyExpression) {
      return describeExpression((PyExpression)element, referenceElement, context);
    }
    else if (element instanceof PyTypeParameter typeParameter) {
      return PyPsiBundle.message("QDOC.type.parameter.name", describeTypeParameter(typeParameter, true,  context));
    }
    else if (element instanceof PyTypeAliasStatement typeAliasStatement) {
      return describeTypeAlias(typeAliasStatement, context).toString();
    }
    return null;
  }
@Override
  @Nullable
  public @Nls String getQuickNavigateInfo(PsiElement element, @NotNull PsiElement originalElement)