code: def test_small_bitcost_for_dirac_prior(self):
      prior = uniform_noise.NoisyNormal(
          loc=100.0 * tf.range(16.0), scale=1e-10
      )
      em = ContinuousBatchedEntropyModel(
          prior, coding_rank=2, compression=True
      )
      num_symbols = 1000
      source = prior.base
      x = source.sample((3, num_symbols))
      _, bits_estimate = em(x, training=True)
      bitstring = em.compress(x)
      x_decoded = em.decompress(bitstring, (num_symbols,))
      bitstring_bits = tf.reshape(
          [len(b) * 8 for b in bitstring.numpy().flatten()],
          bitstring.shape,
      )
      # Max 2 bytes.
      self.assertAllLessEqual(bits_estimate, 16)
      self.assertAllLessEqual(bitstring_bits, 16)
      # Quantization noise should be between -.5 and .5
      self.assertAllClose(x, x_decoded, rtol=0.0, atol=0.5)
  
imports: from absl.testing import parameterized
  import tensorflow
  import tensorflow_probability
  from tensorflow_compression.python.distributions import uniform_noise
  from tensorflow_compression.python.entropy_models.continuous_batched import ContinuousBatchedEntropyModel
label_desc: Use image node_id 15 for calling the ContinuousBatchedEntropyModelTest obj's underlying member method code with example usage: obj.test_small_bitcost_for_dirac_prior() without return types