A pre-canned builder for fixed gaussian prior distributions.

  Given a true `getter` function and arguments forwarded from `tf.get_variable`,
  return a distribution object for a scalar-valued fixed gaussian prior which
  will be broadcast over a variable of the requisite shape.

  Args:
    getter: The `getter` passed to a `custom_getter`. Please see the
      documentation for `tf.get_variable`.
    name: The `name` argument passed to `tf.get_variable`.
    dtype: The `dtype` argument passed to `tf.get_variable`.
    *args: See positional arguments passed to `tf.get_variable`.
    **kwargs: See keyword arguments passed to `tf.get_variable`.

  Returns:
    An instance of `tfp.distributions.Normal` representing the prior
    distribution over the variable in question.

def fixed_gaussian_prior_builder(
    getter, name, dtype=None, *args, **kwargs):
  """A pre-canned builder for fixed gaussian prior distributions.

  Given a true `getter` function and arguments forwarded from `tf.get_variable`,
  return a distribution object for a scalar-valued fixed gaussian prior which
  will be broadcast over a variable of the requisite shape.

  Args:
    getter: The `getter` passed to a `custom_getter`. Please see the
      documentation for `tf.get_variable`.
    name: The `name` argument passed to `tf.get_variable`.
    dtype: The `dtype` argument passed to `tf.get_variable`.
    *args: See positional arguments passed to `tf.get_variable`.
    **kwargs: See keyword arguments passed to `tf.get_variable`.

  Returns:
    An instance of `tfp.distributions.Normal` representing the prior
    distribution over the variable in question.
  """
  del getter  # Unused.
  del args  # Unused.
  del kwargs  # Unused.
  loc = tf.constant(0.0, shape=(), dtype=dtype)
  scale = tf.constant(0.01, shape=(), dtype=dtype)
  return tfp.distributions.Normal(
      loc=loc, scale=scale, name="{}_prior_dist".format(name))