def _colorize(text, colorize=True):
    if not colorize or not sys.stdout.isatty():
        return text
    try:
        from pygments import highlight
        from pygments.formatters import TerminalFormatter
        from pygments.lexers import PythonLexer
        return highlight(text, PythonLexer(), TerminalFormatter())
    except __HOLE__:
        return text
dataset/ETHPy150Open scrapy/scrapy/scrapy/utils/display.py/_colorize