docs: def _colorize(self, msg, color=None, encode=False):
          """
          Colorize a string.
          """
          
          # Valid colors
          colors = {
              'red':    '31',
              'green':  '32',
              'yellow': '33'
          }
          
          # No color specified or unsupported color
          if not color or not color in colors:
              return msg
          
          # The colorized string
          if encode:
              return u'\x1b[1;{}m{}\x1b[0m'.format(colors[color], msg)
          return '\x1b[1;{}m{}\x1b[0m'.format(colors[color], msg)