code: def __init__(
      self,
      level=None,
      stream=sys.stdout,
      colored=False,
      dont_set_formater=False,
  ):
      super(ClearmlStreamHandler, self).__init__(stream=stream)
      self.setLevel(level)
      if dont_set_formater:
          return
  
      formatter = None
      # if colored, try to import colorama & coloredlogs (by default, not in the requirements)
      if colored:
          try:
              import colorama
              from coloredlogs import ColoredFormatter
  
              colorama.init()
              formatter = ColoredFormatter(
                  "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
              )
          except ImportError:
              colored = False
      # if we don't need or failed getting colored formatter
      if not colored or not formatter:
          formatter = logging.Formatter(
              "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
          )
      self.setFormatter(formatter)
  
imports: import inspect
  import logging
  import logging.handlers
  import os
  import sys
  from os import getenv
  from platform import system
  from typing import Optional, Union
  from pathlib2 import Path
  from six import BytesIO
label_desc: Use image node_id 1 to create a new ClearmlStreamHandler object from inherited base classes: logging, ClearmlLoggerHandler with example: obj = ClearmlStreamHandler(level, stream, colored, dont_set_formater)