code: def test_info_and_warning(app, status, warning):
      app.verbosity = 2
      logging.setup(app, status, warning)
      logger = logging.getLogger(__name__)
  
      logger.debug("message1")
      logger.info("message2")
      logger.warning("message3")
      logger.critical("message4")
      logger.error("message5")
  
      assert "message1" in status.getvalue()
      assert "message2" in status.getvalue()
      assert "message3" not in status.getvalue()
      assert "message4" not in status.getvalue()
      assert "message5" not in status.getvalue()
  
      assert "message1" not in warning.getvalue()
      assert "message2" not in warning.getvalue()
      assert "WARNING: message3" in warning.getvalue()
      assert "CRITICAL: message4" in warning.getvalue()
      assert "ERROR: message5" in warning.getvalue()
  
imports: import codecs
  import os
  import os.path
  import pytest
  from docutils import nodes
  from sphinx.errors import SphinxWarning
  from sphinx.testing.util import strip_escseq
  from sphinx.util import logging, osutil
  from sphinx.util.console import colorize
  from sphinx.util.logging import is_suppressed_warning, prefixed_warnings
  from sphinx.util.parallel import ParallelTasks
label_desc: Use image node_id 1 for calling a global function with example usage: test_info_and_warning(app, status, warning) without return types