docstr: Test randomly generated batches of data.
docstr_tok: ["Test","randomly","generated","batches","of","data","."]
code: def test_random(self, dct_type, norm, shape, dtype):
      """Test randomly generated batches of data."""
      # "ortho" normalization is not implemented for type I.
      if dct_type == 1 and norm == "ortho":
          return
      with self.session():
          tol = 5e-4 if dtype == np.float32 else 1e-7
          signals = np.random.rand(*shape).astype(dtype)
          n = np.random.randint(1, 2 * signals.shape[-1])
          n = np.random.choice([None, n])
          self._compare(
              signals,
              n,
              norm=norm,
              dct_type=dct_type,
              rtol=tol,
              atol=tol,
          )
  
imports: import importlib
  import itertools
  from absl.testing import parameterized
  import numpy
  from tensorflow.python.eager import def_function
  from tensorflow.python.framework import tensor_spec
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops.signal import dct_ops
  from tensorflow.python.platform import test
  from tensorflow.python.platform import tf_logging
label_desc: Use image node_id 2 for calling the DCTOpsTest obj's underlying member method code with example usage: obj.test_random(dct_type, norm, shape, dtype) without return types