def low_contrast(img, factor):
    if (np.random.sample() <= p):
        enhancer = ImageEnhance.Contrast(img)
        return enhancer.enhance(factor)
    else:
        return img
def low_contrast(img, factor):
    if (np.random.sample() <= p):
        enhancer = ImageEnhance.Contrast(img)
        return enhancer.enhance(factor)
    else:
        return img