code: def setup(app: Sphinx) -> dict[str, Any]:
      app.add_html_math_renderer(
          "mathjax",
          (html_visit_math, None),
          (html_visit_displaymath, None),
      )
  
      app.add_config_value("mathjax_path", MATHJAX_URL, "html")
      app.add_config_value("mathjax_options", {}, "html")
      app.add_config_value("mathjax_inline", [r"\(", r"\)"], "html")
      app.add_config_value("mathjax_display", [r"\[", r"\]"], "html")
      app.add_config_value("mathjax_config", None, "html")
      app.add_config_value(
          "mathjax2_config", lambda c: c.mathjax_config, "html"
      )
      app.add_config_value("mathjax3_config", None, "html")
      app.connect("html-page-context", install_mathjax)
  
      return {
          "version": sphinx.__display_version__,
          "parallel_read_safe": True,
      }
  
file_path: sphinx/sphinx/ext/mathjax.py
imports: from __future__ import annotations
  import json
  from typing import TYPE_CHECKING, Any, cast
  from docutils import nodes
  import sphinx
  from sphinx.builders.html import StandaloneHTMLBuilder
  from sphinx.domains.math import MathDomain
  from sphinx.errors import ExtensionError
  from sphinx.locale import _
  from sphinx.util.math import get_node_equation_number
label_desc: Use image node_id 4 for calling a global function with example usage: setup(app) and returns: dict