code: def __init__(self, capture_warnings=True):
      self._logger = None
      # Multi-GPU runs run in separate processes, thread locks shouldn't be needed
      self._logger_lock = threading.Lock()
      self._handlers = dict()
      self.old_warnings_showwarning = None
      self._define_logger(capture_warnings)
      self.once_logged = set()
      self.rank = 0 if is_global_rank_zero() else "UNK"
  
imports: import enum
  import logging
  import sys
  import threading
  import warnings
  from contextlib import contextmanager
  from logging.handlers import MemoryHandler
  from nemo.constants import NEMO_ENV_VARNAME_REDIRECT_LOGS_TO_STDERR, NEMO_ENV_VARNAME_TESTING
  from nemo.utils.env_var_parsing import get_envbool
  from nemo.utils.formatters.base import BaseNeMoFormatter, DebugNeMoFormatter
  from nemo.utils.get_rank import is_global_rank_zero
  from nemo.utils.metaclasses import Singleton
label_desc: Use image node_id 1 to create a new Logger object  with example: obj = Logger(capture_warnings)