class_docstr: Nonlinear transform coding model.
code: def plot_prior(self, figsize=None, xlim=None, **kwargs):
      prior = self.prior(**kwargs)
      assert not tuple(prior.event_shape)
      if not xlim:
          xlim = (
              tf.reduce_min(tfc.lower_tail(prior, 1e-5)),
              tf.reduce_max(tfc.upper_tail(prior, 1e-5)),
          )
      y = tf.linspace(xlim[0], xlim[1], 1000)[:, None]
      prob = prior.prob(y)
      plt.figure(figsize=figsize or (16, 8))
      plt.plot(y, prob)
      plt.grid()
      plt.xlabel("latent space")
      plt.ylabel("$p$")
      plt.figure(figsize=figsize or (16, 8))
      plt.imshow(
          tf.transpose(prob),
          aspect="auto",
          extent=(xlim[0], xlim[1], -0.5, self.ndim_latent - 0.5),
      )
      plt.xlabel("latent space")
      plt.ylabel("latent dimension")
  
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 17 for calling the NTCModel obj's underlying member method code with example usage: obj.plot_prior(figsize, xlim) without return types