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