code: def html_visit_inheritance_diagram(
      self: HTML5Translator, node: inheritance_diagram
  ) -> None:
      """
      Output the graph for HTML.  This will insert a PNG with clickable
      image map.
      """
      graph = node["graph"]
  
      graph_hash = get_graph_hash(node)
      name = "inheritance%s" % graph_hash
  
      # Create a mapping from fully-qualified class names to URLs.
      graphviz_output_format = (
          self.builder.env.config.graphviz_output_format.upper()
      )
      current_filename = path.basename(
          self.builder.current_docname + self.builder.out_suffix
      )
      urls = {}
      pending_xrefs = cast(Iterable[addnodes.pending_xref], node)
      for child in pending_xrefs:
          if child.get("refuri") is not None:
              # Construct the name from the URI if the reference is external via intersphinx
              if not child.get("internal", True):
                  refname = child["refuri"].rsplit("#", 1)[-1]
              else:
                  refname = child["reftitle"]
  
              urls[refname] = child.get("refuri")
          elif child.get("refid") is not None:
              if graphviz_output_format == "SVG":
                  urls[child["reftitle"]] = (
                      current_filename + "#" + child.get("refid")
                  )
              else:
                  urls[child["reftitle"]] = "#" + child.get("refid")
  
      dotcode = graph.generate_dot(name, urls, env=self.builder.env)
      render_dot_html(
          self,
          node,
          dotcode,
          {},
          "inheritance",
          "inheritance",
          alt="Inheritance diagram of " + node["content"],
      )
      raise nodes.SkipNode
  
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 4 for calling a global function with example usage: html_visit_inheritance_diagram(node) without return types