class_docstr: Nonlinear transform coding model.
code: def prior(self, soft_round, scale=None, alpha=None, skip_noise=False):
      if self.prior_type == "deep":
          prior = self._prior
      elif self.prior_type[:4] in ("gsm-", "gmm-", "lsm-", "lmm-"):
          cls = (
              tfpd.Normal
              if self.prior_type.startswith("g")
              else tfpd.Logistic
          )
          prior = tfpd.MixtureSameFamily(
              mixture_distribution=tfpd.Categorical(logits=self.logits),
              components_distribution=cls(
                  loc=self.loc, scale=tf.math.exp(self.log_scale)
              ),
          )
      if soft_round:
          if alpha is None:
              alpha = self.alpha
          prior = tfc.SoftRoundAdapter(prior, alpha)
      if skip_noise:
          return prior
      return tfc.UniformNoiseAdapter(prior)
  
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 2 for calling the NTCModel obj's underlying member method code with example usage: obj.prior(soft_round, scale, alpha, skip_noise) and returns: tfc, prior