code: def normal_generator(shape):
      shape = ps.convert_to_shape_tensor(shape, dtype=np.int32)
      loc = yield trainable_state_util.Parameter(
          init_fn=functools.partial(samplers.normal, shape=shape),
          name="loc",
      )
      bij = softplus.Softplus()
      scale = yield trainable_state_util.Parameter(
          init_fn=lambda seed: bij.forward(
              samplers.normal(shape, seed=seed)
          ),
          constraining_bijector=bij,
          name="scale",
      )
      return normal.Normal(loc=loc, scale=scale, validate_args=True)
  
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 2 for calling a global function with example usage: normal_generator(shape) and returns: normal