def _make_pixel_array(pixels, greyscale):
    def bw_color(r, g, b):
        rgb = r, g, b
        if rgb == (0, 0, 0):
            return 0
        elif rgb == (255, 255, 255):
            return 1
        else:
            raise ValueError('Unexpected RGB tuple: {0})'.format(rgb))
    res = []
    if greyscale:
        for row in pixels:
            res.append(list(row[:]))
    else:
        for row in pixels:
            it = [iter(row)] * 3
            res.append([bw_color(r, g, b) for r, g, b in zip(*it)])
    return res
takes no arguments
dataset/ETHPy150Open mnooner256/pyqrcode/tests/utils.py/_make_pixel_array--crossover with--dataset/ETHPy150Open ProgVal/Limnoria/plugins/Unix/plugin.py/Unix.progstats