code: def __init__(self, use_color=None, log_name=False, log_pid=False):
      if use_color is None:
          # if 'auto' - use color only if all streams are tty
          use_color = is_interactive()
      self.use_color = (
          use_color and platform.system() != "Windows"
      )  # don't use color on windows
      msg = colors.format_msg(
          self._get_format(log_name, log_pid), self.use_color
      )
      log_env = os.environ.get("DATALAD_LOG_TRACEBACK", "")
      collide = log_env == "collide"
      # if an integer level is given, we add one level to make the behavior
      # more natural. The last frame will always be where the log record
      # was emitted by out handler. However, user is more interested in the
      # location where the log message originates.
      # Saying DATALAD_LOG_TRACEBACK=1 will give that in most cases, with
      # this internal increment
      limit = (
          100
          if collide
          else int(log_env) + 1
          if log_env.isdigit()
          else 100
      )
      self._tb = (
          TraceBack(collide=collide, limit=limit) if log_env else None
      )
  
      self._mem = (
          MemoryInfo()
          if os.environ.get("DATALAD_LOG_VMEM", "")
          else None
      )
      logging.Formatter.__init__(self, msg)
  
imports: from contextlib import contextmanager
  from functools import partial
  import inspect
  import logging
  import os
  import sys
  import platform
  import random
  import logging.handlers
  import warnings
  from os.path import basename, dirname
  from collections import defaultdict
  from .utils import is_interactive, optional_args
  from .support import ansi_colors
label_desc: Use image node_id 1 to create a new ColorFormatter object from inherited base classes: logging with example: obj = ColorFormatter(use_color, log_name, log_pid)