def grayscale(img, p):
    if (np.random.sample() <= p):
        return ImageOps.grayscale(img)
    else:
        return img
def grayscale(img, p):
    if (np.random.sample() <= p):
        return ImageOps.grayscale(img)
    else:
        return img