class_docstr: Nonlinear transform coding model.
code: def synthesis(self, y):
      x = tf.cast(y, self.dtype)
      if x.shape[-1] != self.ndim_latent:
          raise ValueError(
              f"Expected {self.ndim_latent} trailing dimensions, "
              f"received {x.shape[-1]}."
          )
      batch_shape = tf.shape(x)[:-1]
      x = tf.reshape(x, (-1, self.ndim_latent))
      x = self._synthesis(x)
      assert x.shape[-1] == self.ndim_source
      return tf.reshape(
          x, tf.concat([batch_shape, [self.ndim_source]], 0)
      )
  
imports: import matplotlib.pyplot
  import numpy
  import tensorflow
  import tensorflow_compression
  import tensorflow_probability
  from toy_sources import compression_model
label_desc: Use image node_id 5 for calling the NTCModel obj's underlying member method code with example usage: obj.synthesis(y) and returns: tf