code: def test_graphviz_png_html(app, status, warning):
      app.build(force_all=True)
  
      content = (app.outdir / "index.html").read_text(encoding="utf8")
      html = (
          r'<figure class="align-default" .*?>\s*'
          r'<div class="graphviz"><img .*?/></div>\s*<figcaption>\s*'
          r'<p><span class="caption-text">caption of graph</span>.*</p>\s*'
          r"</figcaption>\s*</figure>"
      )
      assert re.search(html, content, re.S)
  
      html = 'Hello <div class="graphviz"><img .*?/></div>\n graphviz world'
      assert re.search(html, content, re.S)
  
      html = (
          '<img src=".*?" alt="digraph foo {\nbaz -&gt; qux\n}" '
          'class="graphviz neato-graph" />'
      )
      assert re.search(html, content, re.S)
  
      html = (
          r'<figure class="align-right" .*?>\s*'
          r'<div class="graphviz"><img .*?/></div>\s*<figcaption>\s*'
          r'<p><span class="caption-text">on <em>right</em></span>.*</p>\s*'
          r"</figcaption>\s*</figure>"
      )
      assert re.search(html, content, re.S)
  
      html = (
          r"<div align=\"center\" class=\"align-center\">"
          r'<div class="graphviz"><img src=\".*\.png\" alt=\"digraph foo {\n'
          r"centered\n"
          r'}\" class="graphviz" /></div>\n</div>'
      )
      assert re.search(html, content, re.S)
  
file_path: sphinx/tests/test_extensions/test_ext_graphviz.py
imports: import re
  import sys
  import pytest
  from sphinx.ext.graphviz import ClickableMapDefinition
label_desc: Use image node_id 1 for calling a global function with example usage: test_graphviz_png_html(app, status, warning) without return types