def METHOD_NAME(self):
    batch_size = 32
    dummy_inputs = self.rng.uniform(shape=(batch_size, 224, 224, 3))
    layer = RandomApply(rate=0.5, layer=ZeroOut(), seed=1234)
    outputs = layer(dummy_inputs)
    num_zero_inputs = self._num_zero_batches(dummy_inputs)
    num_zero_outputs = self._num_zero_batches(outputs)
    self.assertEqual(num_zero_inputs, 0)
    self.assertLess(num_zero_outputs, batch_size)
    self.assertGreater(num_zero_outputs, 0)