code: def test_code_block_caption_html(app, status, warning):
      app.build(filenames=[app.srcdir / "caption.rst"])
      html = (app.outdir / "caption.html").read_text(encoding="utf8")
      caption = (
          '<div class="code-block-caption">'
          '<span class="caption-number">Listing 1 </span>'
          '<span class="caption-text">caption <em>test</em> rb'
          '</span><a class="headerlink" href="#id1" '
          'title="Link to this code">\xb6</a></div>'
      )
      assert caption in html
  
imports: import os.path
  import pytest
  from docutils import nodes
  from sphinx.config import Config
  from sphinx.directives.code import LiteralIncludeReader
  from sphinx.testing.util import etree_parse
label_desc: Use image node_id 28 for calling a global function with example usage: test_code_block_caption_html(app, status, warning) without return types