class_docstr: Tests the correctness of the Y = JointMap({nested}) transformation.
code: def testCompositeTensor(self):
      e = exp.Exp()
      sp = softplus.Softplus()
      aff = scale.Scale(scale=2.0)
      bij = joint_map.JointMap(bijectors=[e, sp, aff])
      self.assertIsInstance(bij, tf.__internal__.CompositeTensor)
  
      # Bijector may be flattened into `Tensor` components and rebuilt.
      flat = tf.nest.flatten(bij, expand_composites=True)
      unflat = tf.nest.pack_sequence_as(
          bij, flat, expand_composites=True
      )
      self.assertIsInstance(unflat, joint_map.JointMap)
  
      # Bijector may be input to a `tf.function`-decorated callable.
      @tf.function
      def call_forward(bij, x):
          return bij.forward(x)
  
      x = [1.0, 2.0, 3.0]
      self.assertAllCloseNested(call_forward(unflat, x), bij.forward(x))
  
      # Type spec can be encoded/decoded.
      enc = tf.__internal__.saved_model.encode_structure(bij._type_spec)
      dec = tf.__internal__.saved_model.decode_proto(enc)
      self.assertEqual(bij._type_spec, dec)
  
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 invert
  from tensorflow_probability.python.bijectors import joint_map
  from tensorflow_probability.python.bijectors import ldj_ratio
  from tensorflow_probability.python.bijectors import reshape
  from tensorflow_probability.python.bijectors import scale
  from tensorflow_probability.python.bijectors import shift
  from tensorflow_probability.python.bijectors import softplus
  from tensorflow_probability.python.internal import test_util
label_desc: Use image node_id 7 for calling the JointMapBijectorTest obj's underlying member method code with example usage: obj.testCompositeTensor() and returns: bij