code: def testBijectorCallDistribution(self):
      log_scale = tf.Variable(-1.0)
      self.evaluate(log_scale.initializer)
  
      bij = deferred_module.DeferredModule(
          lambda log_scale: scale.Scale(tf.exp(log_scale)), log_scale
      )
      self.assertLen(bij.trainable_variables, 1)
  
      # Calling the deferred bij produces a concretized TransformedDistribution.
      dist = bij(normal.Normal(0.0, 1.0))
      self.assertLen(dist.trainable_variables, 0)
  
      # We can also defer the call itself, if we like.
      deferred_dist = deferred_module.DeferredModule(
          lambda loc, scale: bij(normal.Normal(loc, scale)),
          loc=0.0,
          scale=1.0,
      )
  
      lp = dist.log_prob(17.0)
      with tf.GradientTape() as tape:
          lp_deferred = deferred_dist.log_prob(17.0)
      g = tape.gradient(lp_deferred, log_scale)
      self.assertIsNotNone(g)
      self.assertAllClose(*self.evaluate((lp, lp_deferred)))
  
file_path: probability/tensorflow_probability/python/experimental/util/deferred_module_test.py
imports: import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import scale
  from tensorflow_probability.python.distributions import gamma
  from tensorflow_probability.python.distributions import normal
  from tensorflow_probability.python.distributions import sample
  from tensorflow_probability.python.distributions import transformed_distribution
  from tensorflow_probability.python.experimental.util import deferred_module
  from tensorflow_probability.python.internal import samplers
  from tensorflow_probability.python.internal import test_util
label_desc: Use image node_id 5 for calling the DeferredModuleTest obj's underlying member method code with example usage: obj.testBijectorCallDistribution() without return types