code: def testBasic(self):
      distribution = inverse_gamma.InverseGamma(16.0, 4.0)
      seed = test_util.test_seed()
      unbounded_result = (
          sample_parameters.sample_with_optional_upper_bound(
              distribution, seed=seed
          )
      )
      # Whatever the result, we want to get that value again minus a fixed offset.
      # Since we fix the seed, we know it is equal just because of the upper
      # bound.
      new_target_result = unbounded_result - 0.5
      distribution.upper_bound = new_target_result
      self.assertAllEqual(
          new_target_result,
          sample_parameters.sample_with_optional_upper_bound(
              distribution, seed=seed
          ),
      )
  
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 1 for calling the SampleWithOptionalUpperBoundTest obj's underlying member method code with example usage: obj.testBasic() without return types