code: def test_colored_logs(app, status, warning):
      app.verbosity = 2
      logging.setup(app, status, warning)
      logger = logging.getLogger(__name__)
  
      # default colors
      logger.debug("message1")
      logger.verbose("message2")
      logger.info("message3")
      logger.warning("message4")
      logger.critical("message5")
      logger.error("message6")
  
      assert colorize("darkgray", "message1") in status.getvalue()
      assert "message2\n" in status.getvalue()  # not colored
      assert "message3\n" in status.getvalue()  # not colored
      assert colorize("red", "WARNING: message4") in warning.getvalue()
      assert "CRITICAL: message5\n" in warning.getvalue()  # not colored
      assert (
          colorize("darkred", "ERROR: message6") in warning.getvalue()
      )
  
      # color specification
      logger.debug("message7", color="white")
      logger.info("message8", color="red")
      assert colorize("white", "message7") in status.getvalue()
      assert colorize("red", "message8") in status.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 13 for calling a global function with example usage: test_colored_logs(app, status, warning) without return types