def colorizer(tag, text):
    """Basic ANSI colorized output - host hash value map to 7-color palette, stderr bold"""
    label, hilight = tag
    color = 1 + hash(label) % 7
    for line in text.split('\n'):
        if hilight:
            yield '\x1b[30;4%dm[%s]\x1b[0;1;3%dm %s\x1b[0m\n' % (color,
                label, color, line)
        else:
            yield '\x1b[3%dm[%s] %s\x1b[0m\n' % (color, label, line)
