code: def test_apply_raises_on_bad_parameters(self):
      init_fn, apply_fn = trainable_state_util.as_stateless_builder(
          normal_generator
      )(shape=[2])
      good_params = init_fn(
          seed=test_util.test_seed(sampler_type="stateless")
      )
      # Check that both calling styles are supported.
      self.assertIsInstance(apply_fn(good_params), normal.Normal)
      self.assertIsInstance(apply_fn(*good_params), normal.Normal)
  
      with self.assertRaisesRegex(
          ValueError, "Insufficient parameters"
      ):
          apply_fn()
      with self.assertRaisesRegex(
          ValueError, "Insufficient parameters"
      ):
          apply_fn(None)
      apply_fn(list(good_params) + [np.array(2.0)])
  
imports: import functools
  from absl.testing import parameterized
  import numpy
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import identity
  from tensorflow_probability.python.bijectors import joint_map
  from tensorflow_probability.python.bijectors import softplus
  from tensorflow_probability.python.distributions import deterministic
  from tensorflow_probability.python.distributions import joint_distribution_auto_batched
  from tensorflow_probability.python.distributions import joint_distribution_sequential
  from tensorflow_probability.python.distributions import lognormal
  from tensorflow_probability.python.distributions import normal
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.internal import samplers
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.internal import tf_keras
  from tensorflow_probability.python.internal import trainable_state_util
  from tensorflow_probability.python.math import gradient
  from tensorflow_probability.python.math.minimize import minimize
  from tensorflow_probability.python.math.minimize import minimize_stateless
label_desc: Use image node_id 11 for calling the TestWrapGeneratorAsStateless obj's underlying member method code with example usage: obj.test_apply_raises_on_bad_parameters() without return types