code: def test_inheritance_diagram_latex_alias(app, status, warning):
      app.config.inheritance_alias = {"test.Foo": "alias.Foo"}
      app.build(force_all=True)
  
      doc = app.env.get_and_resolve_doctree("index", app)
      aliased_graph = doc.children[0].children[3]["graph"].class_info
      assert len(aliased_graph) == 4
      assert (
          "test.DocSubDir2",
          "test.DocSubDir2",
          ["test.DocSubDir1"],
          None,
      ) in aliased_graph
      assert (
          "test.DocSubDir1",
          "test.DocSubDir1",
          ["test.DocHere"],
          None,
      ) in aliased_graph
      assert (
          "test.DocHere",
          "test.DocHere",
          ["alias.Foo"],
          None,
      ) in aliased_graph
      assert ("alias.Foo", "alias.Foo", [], None) in aliased_graph
  
      content = (app.outdir / "index.html").read_text(encoding="utf8")
  
      pattern = (
          '<figure class="align-default" id="id1">\n'
          '<div class="graphviz">'
          '<img src="_images/inheritance-\\w+.png" alt="Inheritance diagram of test.Foo" '
          'class="inheritance graphviz" /></div>\n<figcaption>\n<p>'
          '<span class="caption-text">Test Foo!</span><a class="headerlink" href="#id1" '
          'title="Link to this image">\xb6</a></p>\n</figcaption>\n</figure>\n'
      )
      assert re.search(pattern, content, re.M)
  
file_path: sphinx/tests/test_extensions/test_ext_inheritance_diagram.py
imports: import os
  import re
  import sys
  import zlib
  import pytest
  from sphinx.ext.inheritance_diagram import InheritanceDiagram, InheritanceException, import_classes
  from sphinx.ext.intersphinx import load_mappings, normalize_intersphinx_mapping
label_desc: Use image node_id 5 for calling a global function with example usage: test_inheritance_diagram_latex_alias(app, status, warning) without return types