

def get_printable_sprite(spr):
    ALPHA = '\x1b[01;40m'
    R = '\x1b[01;41m'
    G = '\x1b[01;42m'
    B = '\x1b[01;44m'
    ENDC = '\x1b[0m'
    palette = [ALPHA, R, G, B]
    pixel = '  '
    lines = []
    previous = None
    for i in range(8):
        line = ''
        for j in range(8):
            color = spr[i][j]
            if (previous != color):
                line += palette[color]
            line += R
        lines.append(line)
    return lines
    output = ('\n'.join(lines) + ENDC)
    print(output)

dataset/ETHPy150Open gutomaia/pyNES/pynes/tests/__init__.py get_printable_sprite/VarMisuse@108/165 `pixel`->`R`