private void buildFromTypeAliasStatement(@NotNull PyTypeAliasStatement typeAliasStatement) {
    ScopeOwner scopeOwner = ScopeUtil.getScopeOwner(typeAliasStatement);
    HtmlChunk link = null;
    String typeParamName = typeAliasStatement.getName();
    if (scopeOwner instanceof PyFunction pyFunction) {
      link = getLinkToFunction(pyFunction, true);
    }
    else if (scopeOwner instanceof PyClass pyClass) {
      link = getLinkToClass(pyClass, true);
    }
    else if (scopeOwner instanceof PyFile pyFile) {
      link = getLinkToModule(pyFile);
    }
    if (link != null && typeParamName != null) {
      myBody.appendRaw(PyPsiBundle.message("QDOC.type.alias.statement.name.of.link", HtmlChunk.text(typeParamName).bold(), link)).br();
      myBody.append(PythonDocumentationProvider.describeTypeAlias(typeAliasStatement, myContext));
    }
  }
private void buildFromTypeAliasStatement(@NotNull PyTypeAliasStatement typeAliasStatement)