class_docstr: Tests the correctness of the Y = Invert(bij) transformation.
code: def testNonCompositeTensorBijectorRetainsVariable(self):
      class BijectorContainer(tf.Module):
          def __init__(self, bijector):
              self.bijector = bijector
  
      b = bijector_test_util.NonCompositeTensorScale(tf.Variable(3.0))
      inv_b = invert.Invert(b)
      bc = BijectorContainer(inv_b)
  
      # If `Invert` subclasses `CompositeTensor` but its inner bijector does not,
      # this test fails because `tf.Module.trainable_variables` calls
      # `nest.flatten(..., expand_composites=True` on the `tf.Module`s attributes.
      # `Invert._type_spec` will treat the inner bijector as a callable (see
      # `AutoCompositeTensor` docs) and not decompose the inner bijector correctly
      # into its `Tensor` components.
      self.assertLen(bc.trainable_variables, 1)
  
imports: import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import bijector_test_util
  from tensorflow_probability.python.bijectors import exp
  from tensorflow_probability.python.bijectors import identity
  from tensorflow_probability.python.bijectors import invert
  from tensorflow_probability.python.bijectors import scale_matvec_diag
  from tensorflow_probability.python.bijectors import shift
  from tensorflow_probability.python.bijectors import softmax_centered
  from tensorflow_probability.python.bijectors import softplus
  from tensorflow_probability.python.distributions import gamma
  from tensorflow_probability.python.distributions import transformed_distribution
  from tensorflow_probability.python.internal import tensorshape_util
  from tensorflow_probability.python.internal import test_util
label_desc: Use image node_id 9 for calling the InvertBijectorTest obj's underlying member method code with example usage: obj.testNonCompositeTensorBijectorRetainsVariable() without return types