code: def format(self, record):
      msg = "%(message)s"
      if record.levelno == logging.WARNING:
          date = colored(
              "[%(asctime)s %(threadName)s @%(filename)s:%(lineno)d]",
              "yellow",
          )
          fmt = (
              date
              + " "
              + colored("WRN", "yellow", attrs=["blink"])
              + " "
              + msg
          )
      elif (
          record.levelno == logging.ERROR
          or record.levelno == logging.CRITICAL
      ):
          date = colored(
              "[%(asctime)s %(threadName)s @%(filename)s:%(lineno)d]",
              "red",
          )
          fmt = (
              date
              + " "
              + colored("WRN", "yellow", attrs=["blink"])
              + " "
              + msg
          )
          fmt = (
              date
              + " "
              + colored("ERR", "red", attrs=["blink", "underline"])
              + " "
              + msg
          )
      elif record.levelno == logging.DEBUG:
          date = colored(
              "[%(asctime)s %(threadName)s @%(filename)s:%(lineno)d]",
              "blue",
          )
          fmt = (
              date
              + " "
              + colored("DEBUG", "blue", attrs=["blink"])
              + " "
              + msg
          )
      else:
          date = colored(
              "[%(asctime)s %(threadName)s @%(filename)s:%(lineno)d]",
              "green",
          )
          fmt = date + " " + msg
      if hasattr(self, "_style"):
          # Python3 compatibility
          self._style._fmt = fmt
      self._fmt = fmt
      return super(_Formatter, self).format(record)
  
imports: import errno
  import logging
  import os
  import os.path
  import sys
  from termcolor import colored
  import shutil
  from datetime import datetime
label_desc: Use image node_id 1 for calling the _Formatter obj's underlying member method code with example usage: obj.format(record) and returns: super