code: def testCompressionVariantMismatch(self):
      # Use a dataset as a variant.
      dataset = dataset_ops.Dataset.range(10)
      variant = dataset._variant_tensor
      with self.assertRaises(errors.InvalidArgumentError):
          uncompressed = compression_ops.uncompress(
              variant, dataset.element_spec
          )
          self.evaluate(uncompressed)
  
imports: from collections import namedtuple
  from absl.testing import parameterized
  from tensorflow.python.data.experimental.ops import compression_ops
  from tensorflow.python.data.kernel_tests import test_base
  from tensorflow.python.data.ops import dataset_ops
  from tensorflow.python.data.util import structure
  from tensorflow.python.eager import context
  from tensorflow.python.framework import combinations
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import sparse_tensor
  from tensorflow.python.ops.ragged import ragged_factory_ops
  from tensorflow.python.platform import test
label_desc: Use image node_id 6 for calling the CompressionOpsTest obj's underlying member method code with example usage: obj.testCompressionVariantMismatch() without return types