code: def _default_parameter_init_fn(initial_parameters):
      """Builds a function to specify user-provided initial values."""
  
      def _initialize_with_sampler_fallback(
          parameter_name, shape, dtype, seed, constraining_bijector
      ):
          if parameter_name in initial_parameters:
              # Ensure that the variable we initialize has full shape. For example,
              # trainable(tfd.Normal,
              #           batch_and_event_shape=[100],
              #           initial_parameters={'scale': 1e-4})
              # should create a batch of 100 scale variables, not a single scalar
              # variable shared over all batch elements.
              return tf.broadcast_to(
                  tf.cast(
                      initial_parameters[parameter_name], dtype=dtype
                  ),
                  shape,
              )
          # If no value was provided, sample an appropriately constrained value.
          return constraining_bijector.forward(
              samplers.normal(
                  constraining_bijector.inverse_event_shape_tensor(
                      shape
                  ),
                  dtype=dtype,
                  seed=seed,
              )
          )
  
      return _initialize_with_sampler_fallback
  
file_path: probability/tensorflow_probability/python/experimental/util/trainable.py
imports: import functools
  import tensorflow.compat.v2
  from tensorflow_probability.python.internal import docstring_util
  from tensorflow_probability.python.internal import samplers
  from tensorflow_probability.python.internal import trainable_state_util
  from tensorflow.python.util import tf_inspect
label_desc: Use image node_id 2 for calling a global function with example usage: _default_parameter_init_fn(initial_parameters) and returns: _initialize_with_sampler_fallback, constraining_bijector, tf