code: def testUpperBoundPropagatedFromPrior(self):
      # If no upper bound is provided, expect there to be none.
      distribution = inverse_gamma.InverseGamma(16.0, 4.0)
      posterior_distribution = sample_parameters.normal_scale_posterior_inverse_gamma_conjugate(
          distribution, observations=tf.constant([], dtype=tf.float32)
      )
      self.assertFalse(hasattr(posterior_distribution, "upper_bound"))
      self.assertFalse(
          hasattr(posterior_distribution.distribution, "upper_bound")
      )
  
      distribution = inverse_gamma.InverseGamma(16.0, 4.0)
      distribution.upper_bound = 16.0
      posterior_distribution = sample_parameters.normal_scale_posterior_inverse_gamma_conjugate(
          distribution, observations=tf.constant([], dtype=tf.float32)
      )
      self.assertAllEqual(
          posterior_distribution.distribution.upper_bound, 16.0
      )
      self.assertAllEqual(
          posterior_distribution.upper_bound,
          # TODO(kloveless): This should have sqrt applied, but it is not for
          # temporary backwards compatibility.
          16.0,
      )
  
file_path: probability/tensorflow_probability/python/experimental/sts_gibbs/sample_parameters_test.py
imports: import tensorflow
  from tensorflow_probability.python.bijectors import invert
  from tensorflow_probability.python.bijectors import square
  from tensorflow_probability.python.distributions import inverse_gamma
  from tensorflow_probability.python.distributions import transformed_distribution
  from tensorflow_probability.python.experimental.sts_gibbs import sample_parameters
  from tensorflow_probability.python.internal import test_util
label_desc: Use image node_id 4 for calling the NormalScalePosteriorInverseGammaConjugate obj's underlying member method code with example usage: obj.testUpperBoundPropagatedFromPrior() without return types