def ansi_wrap(text, **kw):
    start_sequence = ansi_style(**kw)
    if start_sequence:
        end_sequence = ANSI_RESET
        if kw.get('readline_hints'):
            end_sequence = readline_wrap(end_sequence)
        return start_sequence + text + end_sequence
    else:
        return text
Wrap text in ANSI escape sequences for the given color and/or style(s).
dataset/ETHPy150Open xolox/python-humanfriendly/humanfriendly/terminal.py/ansi_wrap