code: def test_binomial(self, seed, shape, counts, probabilities, dtype):
      set_random_seed(1337)
      values = random.binomial(
          shape=shape,
          counts=counts,
          probabilities=probabilities,
          seed=seed,
          dtype=dtype,
      )
      self.assertEqual(ops.shape(values), shape)
      self.assertEqual(backend.standardize_dtype(values.dtype), dtype)
  
      # The following test that ensures that the number of time
      # each event occurs doesn't exceed the total input count specified
      # by the user for that event.
      # Hence, we do an element wise comparison between `counts` array
      # and the (generated) `values` array.
      values_np = ops.convert_to_numpy(values)
      assert np.greater_equal(np.array(counts), values_np).all()
  
      # Following test computes the probabilities of each event
      # by dividing number of times an event occurs (which is the generated
      # value) by the corresponding value in the (total) counts array.
      # and then makes sure that the computed probabilities approximate
      # the input probabilities
      generated_probabilities = values_np / np.array(counts)
      probabilities = np.ones(shape) * np.array(probabilities)
      self.assertAllClose(
          probabilities, generated_probabilities, rtol=0.005, atol=0.005
      )
  
imports: import numpy
  import pytest
  from absl.testing import parameterized
  import keras
  from keras import backend
  from keras import ops
  from keras import testing
  from keras.random import random
  from keras.random import seed_generator
  from keras.utils.rng_utils import set_random_seed
label_desc: Use image node_id 17 for calling the RandomTest obj's underlying member method code with example usage: obj.test_binomial(seed, shape, counts, probabilities, dtype) without return types