code: def test_ifconfig(app, status, warning):
      app.build(force_all=True)
      result = (app.outdir / "index.txt").read_text(encoding="utf8")
      assert "spam" in result
      assert "ham" not in result
  
imports: import docutils.utils
  import pytest
  from sphinx import addnodes
  from sphinx.testing import restructuredtext
label_desc: Use image node_id 1 for calling a global function with example usage: test_ifconfig(app, status, warning) without return types