code: def test_todo_not_included(app, status, warning):
      todos = []
  
      def on_todo_defined(app, node):
          todos.append(node)
  
      app.connect("todo-defined", on_todo_defined)
      app.build(force_all=True)
  
      # check todolist
      content = (app.outdir / "index.html").read_text(encoding="utf8")
      assert (
          '<p class="admonition-title">Todo</p>\n' "<p>todo in foo</p>"
      ) not in content
  
      assert (
          '<p class="admonition-title">Todo</p>\n' "<p>todo in bar</p>"
      ) not in content
  
      # check todo
      content = (app.outdir / "foo.html").read_text(encoding="utf8")
      assert (
          '<p class="admonition-title">Todo</p>\n' "<p>todo in foo</p>"
      ) not in content
  
      # check emitted warnings
      assert (
          "WARNING: TODO entry found: todo in foo" in warning.getvalue()
      )
      assert (
          "WARNING: TODO entry found: todo in bar" in warning.getvalue()
      )
  
      # check handled event
      assert len(todos) == 3
      assert {todo[1].astext() for todo in todos} == {
          "todo in foo",
          "todo in bar",
          "todo in param field",
      }
  
imports: import re
  import pytest
label_desc: Use image node_id 2 for calling a global function with example usage: test_todo_not_included(app, status, warning) without return types