code: def test_texinfo_warnings(app, status, warning):
      app.build(force_all=True)
      warnings = strip_escseq(
          re.sub(re.escape(os.sep) + "{1,2}", "/", warning.getvalue())
      )
      warnings_exp = TEXINFO_WARNINGS.format(
          root=re.escape(app.srcdir.as_posix())
      )
      assert re.match(warnings_exp + "$", warnings), (
          "Warnings don't match:\n"
          + f"--- Expected (regex):\n{warnings_exp}\n"
          + f"--- Got:\n{warnings}"
      )
  
imports: import os
  import re
  import subprocess
  from pathlib import Path
  from subprocess import CalledProcessError
  from unittest.mock import Mock
  import pytest
  from sphinx.builders.texinfo import default_texinfo_documents
  from sphinx.config import Config
  from sphinx.testing.util import strip_escseq
  from sphinx.util.docutils import new_document
  from sphinx.writers.texinfo import TexinfoTranslator
  from tests.test_builders.test_build_html import ENV_WARNINGS
label_desc: Use image node_id 1 for calling a global function with example usage: test_texinfo_warnings(app, status, warning) without return types