code: def test_transformed_exp(self):
      sample_shape = 3
      mvn = independent.Independent(
          normal.Normal(loc=[0.0, 0], scale=1), 1
      )
      exp = exp_lib.Exp()
  
      def expected_lp(y):
          x = exp.inverse(y)  # Ie, tf.random.normal([4, 3, 2])
          fldj = exp.forward_log_det_jacobian(x, event_ndims=1)
          return tf.reduce_sum(mvn.log_prob(x) - fldj, axis=1)
  
      # Transform a Sample.
      d = transformed_distribution.TransformedDistribution(
          sample.Sample(mvn, sample_shape, validate_args=True),
          bijector=exp,
      )
      y = d.sample(4, seed=test_util.test_seed())
      actual_lp = d.log_prob(y)
      self.assertAllEqual((4,) + (sample_shape,) + (2,), y.shape)
      self.assertAllEqual((4,), actual_lp.shape)
      # If `TransformedDistribution` didn't scale the jacobian by
      # `_sample_distribution_size`, then `scale_fldj` would need to be `False`.
      self.assertAllClose(
          *self.evaluate([expected_lp(y), actual_lp]),
          atol=0.0,
          rtol=1e-3,
      )
  
      # Sample a Transform.
      d = sample.Sample(
          transformed_distribution.TransformedDistribution(
              mvn, bijector=exp
          ),
          sample_shape,
          validate_args=True,
      )
      y = d.sample(4, seed=test_util.test_seed())
      actual_lp = d.log_prob(y)
      self.assertAllEqual((4,) + (sample_shape,) + (2,), y.shape)
      self.assertAllEqual((4,), actual_lp.shape)
      # Regardless of whether `TransformedDistribution` scales the jacobian by
      # `_sample_distribution_size`, `scale_fldj` is `True`.
      self.assertAllClose(
          *self.evaluate([expected_lp(y), actual_lp]),
          atol=0.0,
          rtol=1e-3,
      )
  
imports: import functools
  import os
  from absl.testing import parameterized
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import exp
  from tensorflow_probability.python.bijectors import scale
  from tensorflow_probability.python.bijectors import scale_matvec_tril
  from tensorflow_probability.python.distributions import cholesky_lkj
  from tensorflow_probability.python.distributions import exponential
  from tensorflow_probability.python.distributions import independent
  from tensorflow_probability.python.distributions import kullback_leibler
  from tensorflow_probability.python.distributions import log_prob_ratio
  from tensorflow_probability.python.distributions import logistic
  from tensorflow_probability.python.distributions import lognormal
  from tensorflow_probability.python.distributions import mvn_diag
  from tensorflow_probability.python.distributions import normal
  from tensorflow_probability.python.distributions import poisson
  from tensorflow_probability.python.distributions import sample
  from tensorflow_probability.python.distributions import transformed_distribution
  from tensorflow_probability.python.distributions import uniform
  from tensorflow_probability.python.internal import test_util
label_desc: Use image node_id 7 for calling the SampleDistributionTest obj's underlying member method code with example usage: obj.test_transformed_exp() and returns: tf