code: def test_literals(app, status, warning):
      app.build()
  
      with (app.outdir / "literals.html").open(
          encoding="utf-8"
      ) as html_file:
          etree = HTMLParser(namespaceHTMLElements=False).parse(
              html_file
          )
  
      for code_element in etree.iter("code"):
          code_text = "".join(code_element.itertext())
  
          if code_text.startswith("code role"):
              assert "'quotes'" in code_text
          elif code_text.startswith("{"):
              assert code_text == "{'code': 'role', 'with': 'quotes'}"
          elif code_text.startswith("literal"):
              assert code_text == "literal with 'quotes'"
  
file_path: sphinx/tests/test_markup/test_smartquotes.py
imports: import pytest
  from html5lib import HTMLParser
label_desc: Use image node_id 2 for calling a global function with example usage: test_literals(app, status, warning) without return types