code: def test_can_instantiate_and_compress_n_dimensional(self):
      em = universal.UniversalIndexedEntropyModel(
          uniform_noise.NoisyLogisticMixture,
          index_ranges=(10, 10, 5),
          parameter_fns=dict(
              loc=lambda i: i[..., 0:2] - 5,
              scale=lambda _: 1,
              weight=lambda i: tf.nn.softmax(
                  (i[..., 2:3] - 2) * [-1, 1]
              ),
          ),
          coding_rank=1,
          compression=True,
      )
      x = tf.random.stateless_normal((3, 8, 16), seed=(0, 0))
      indexes = tf.cast(
          10 * tf.random.stateless_uniform((3, 8, 16, 3), seed=(0, 0)),
          tf.int32,
      )
      em(x, indexes)
      bitstring = em.compress(x, indexes)
      x_hat = em.decompress(bitstring, indexes)
      # Quantization noise should be between -.5 and .5
      u = x - x_hat
      self.assertAllLessEqual(tf.abs(u), 0.5)
  
imports: from absl.testing import parameterized
  import scipy.stats
  import tensorflow
  import tensorflow_probability
  from tensorflow_compression.python.distributions import deep_factorized
  from tensorflow_compression.python.distributions import uniform_noise
  from tensorflow_compression.python.entropy_models import universal
label_desc: Use image node_id 3 for calling the UniversalIndexedEntropyModelTest obj's underlying member method code with example usage: obj.test_can_instantiate_and_compress_n_dimensional() without return types