def METHOD_NAME(self):
    image_shape = (16, 32, 32, 3)
    fixed_factor = (0.3, -0.3)  # makes lower and upper the same
    image = tf.random.uniform(shape=image_shape)
    layer = RandomContrast(value_range=(0, 255), factor=fixed_factor)
    old_layer = OldRandomContrast(factor=fixed_factor)
    output = layer(image)
    old_output = old_layer(image)
    self.assertAllClose(old_output, output)