code: def setup(app: Sphinx) -> dict[str, Any]:
      app.setup_extension("sphinx.ext.graphviz")
      app.add_node(
          inheritance_diagram,
          latex=(latex_visit_inheritance_diagram, None),
          html=(html_visit_inheritance_diagram, None),
          text=(skip, None),
          man=(skip, None),
          texinfo=(texinfo_visit_inheritance_diagram, None),
      )
      app.add_directive("inheritance-diagram", InheritanceDiagram)
      app.add_config_value("inheritance_graph_attrs", {}, "")
      app.add_config_value("inheritance_node_attrs", {}, "")
      app.add_config_value("inheritance_edge_attrs", {}, "")
      app.add_config_value("inheritance_alias", {}, "")
      return {
          "version": sphinx.__display_version__,
          "parallel_read_safe": True,
      }
  
imports: from __future__ import annotations
  import builtins
  import hashlib
  import inspect
  import re
  from collections.abc import Iterable, Sequence
  from importlib import import_module
  from os import path
  from typing import TYPE_CHECKING, Any, cast
  from docutils import nodes
  from docutils.parsers.rst import directives
  import sphinx
  from sphinx import addnodes
  from sphinx.ext.graphviz import figure_wrapper, graphviz, render_dot_html, render_dot_latex, render_dot_texinfo
  from sphinx.util.docutils import SphinxDirective
label_desc: Use image node_id 8 for calling a global function with example usage: setup(app) and returns: dict