code: def get_logger(name: str, log_level: str = None):
      """
      Returns a `logging.Logger` for `name` that can handle multiprocessing.
  
      If a log should be called on all processes, pass `main_process_only=False` If a log should be called on all
      processes and in order, also pass `in_order=True`
  
      Args:
          name (`str`):
              The name for the logger, such as `__file__`
          log_level (`str`, *optional*):
              The log level to use. If not passed, will default to the `LOG_LEVEL` environment variable, or `INFO` if not
  
      Example:
  
      ```python
      >>> from accelerate.logging import get_logger
      >>> from accelerate import Accelerator
  
      >>> logger = get_logger(__name__)
  
      >>> accelerator = Accelerator()
      >>> logger.info("My log", main_process_only=False)
      >>> logger.debug("My log", main_process_only=True)
  
      >>> logger = get_logger(__name__, log_level="DEBUG")
      >>> logger.info("My log")
      >>> logger.debug("My second log")
  
      >>> array = ["a", "b", "c", "d"]
      >>> letter_at_rank = array[accelerator.process_index]
      >>> logger.info(letter_at_rank, in_order=True)
      ```
      """
      if log_level is None:
          log_level = os.environ.get("ACCELERATE_LOG_LEVEL", None)
      logger = logging.getLogger(name)
      if log_level is not None:
          logger.setLevel(log_level.upper())
          logger.root.setLevel(log_level.upper())
      return MultiProcessAdapter(logger, {})
  
file_path: accelerate/src/accelerate/logging.py
imports: import functools
  import logging
  import os
  from .state import PartialState
label_desc: Use image node_id 1 for calling a global function with example usage: get_logger(name, log_level) and returns: MultiProcessAdapter