def _colorize(self, color, text, bold=False):
        """
        Borrowed from nosetests spec plugin by bitprophet https://github.com/bitprophet/spec/blob/master/spec/plugin.py
        """
        bold = 1 if bold else 0
        return "\x1b[%s;%sm%s%s" % (bold, self.colors.get(color, self.colors['default']), text, self.color_end)
dataset/ETHPy150Open n9code/pylease/pylease/logger.py/ColorFormatter._colorize/original