code: def get_logger(
      name: str,
      level: int = DEFAULT_LOG_LEVEL,
      force_name: bool = False,
  ) -> logging.Logger:
      """Get an Axlogger.
  
      To set a human-readable "output_name" that appears in logger outputs,
      add `{"output_name": "[MY_OUTPUT_NAME]"}` to the logger's contextual
      information. By default, we use the logger's `name`
  
      NOTE: To change the log level on particular outputs (e.g. STDERR logs),
      set the proper log level on the relevant handler, instead of the logger
      e.g. logger.handers[0].setLevel(INFO)
  
      Args:
          name: The name of the logger.
          level: The level at which to actually log.  Logs
              below this level of importance will be discarded
          force_name: If set to false and the module specified
              is not ultimately a descendent of the `ax` module
              specified by `name`, "ax." will be prepended to `name`
  
      Returns:
          The logging.Logger object.
      """
      # because handlers are attached to the "ax" module
      if not force_name and not re.search(
          r"^{ax_root}(\.|$)".format(ax_root=AX_ROOT_LOGGER_NAME), name
      ):
          name = f"{AX_ROOT_LOGGER_NAME}.{name}"
      logger = logging.getLogger(name)
      logger.setLevel(level)
      logger.addFilter(AxOutputNameFilter())
      return logger
  
imports: import logging
  import os
  import re
  from functools import wraps
  from typing import Any, Callable, Iterable, List, TypeVar
  from ax.utils.common.decorator import ClassDecorator
label_desc: Use image node_id 1 for calling a global function with example usage: get_logger(name, level, force_name) and returns: logger