code: def set_log_level(
      verbose=None, return_old_level=False, add_frames=None
  ):
      """Set the logging level.
  
      Parameters
      ----------
      verbose : bool, str, int, or None
          The verbosity of messages to print. If a str, it can be either DEBUG,
          INFO, WARNING, ERROR, or CRITICAL. Note that these are for
          convenience and are equivalent to passing in logging.DEBUG, etc.
          For bool, True is the same as 'INFO', False is the same as 'WARNING'.
          If None, the environment variable MNE_LOGGING_LEVEL is read, and if
          it doesn't exist, defaults to INFO.
      return_old_level : bool
          If True, return the old verbosity level.
      %(add_frames)s
  
      Returns
      -------
      old_level : int
          The old level. Only returned if ``return_old_level`` is True.
      """
      old_verbose = logger.level
      verbose = _parse_verbose(verbose)
  
      if verbose != old_verbose:
          logger.setLevel(verbose)
      if add_frames is not None:
          _filter.add_frames = int(add_frames)
          fmt = "%(frame_info)s " if add_frames else ""
          fmt += "%(message)s"
          fmt = logging.Formatter(fmt)
          for handler in logger.handlers:
              handler.setFormatter(fmt)
      return old_verbose if return_old_level else None
  
imports: import contextlib
  import importlib
  import inspect
  import logging
  import os.path
  import re
  import sys
  import warnings
  from io import StringIO
  from typing import Any, Callable, TypeVar
  from decorator import FunctionMaker
  from .docs import fill_doc
label_desc: Use image node_id 2 for calling a global function with example usage: set_log_level(verbose, return_old_level, add_frames) and returns: unknown