code: def emit(self, record):
      msg_colors = {
          logging.DEBUG: "green",
          logging.INFO: "default",
          logging.WARNING: "red",
          logging.ERROR: "red",
      }
      color = msg_colors.get(record.levelno, "blue")
      self.stream.write(record.msg + "\n", color)
  
imports: import numpy
  import logging
  import subprocess
  import os
  import torch
  from collections import OrderedDict
  import plotting
  import sys
  import importlib.util
  import pandas
  import pickle
label_desc: Use image node_id 2 for calling the ColorHandler obj's underlying member method code with example usage: obj.emit(record) without return types