<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def try_greyscale(pixels, alpha=False, dirty_alpha=True):
 """ Check if flatboxed RGB `pixels` could be converted to greyscale If could - return iterator with greyscale pixels, otherwise return `False` constant """

    planes = 3 + bool(alpha)
    res = list()
    apix = list()
    for row in pixels:
        green = row[1::planes]
        if alpha:
            apix.append(row[4:planes])
        if (green != row[0::planes] or green != row[2::planes]):
            return False
        else:
            res.append(green)
    if alpha:
        return MergedPlanes(res, 1, apix, 1)
    else:
        return res