code: def _colorize(val, color):
      
      if termcolor is not None:
          val = termcolor.colored(val, color)
      elif colorama is not None:
          val = TERMCOLOR2COLORAMA[color] + val + colorama.Style.RESET_ALL
  
      return val
docs: Colorize a string using termcolor or colorama.
  
      If any of them are available.