code: def testNonMapping(self):
      ds = dataset_ops.Dataset.from_tensors(1)
      with self.assertRaisesRegex(
          ValueError,
          "`pad_to_cardinality` requires its input dataset to be a dictionary",
      ):
          ds = ds.apply(pad_to_cardinality(5))
          self.getDatasetOutput(ds)
  
file_path: tensorflow/tensorflow/python/data/experimental/kernel_tests/pad_to_cardinality_test.py
imports: from absl.testing import parameterized
  from tensorflow.python.data.experimental.ops import pad_to_cardinality
  from tensorflow.python.data.kernel_tests import test_base
  from tensorflow.python.data.ops import dataset_ops
  from tensorflow.python.framework import combinations
  from tensorflow.python.platform import test
label_desc: Use image node_id 6 for calling the PadToCardinalityTest obj's underlying member method code with example usage: obj.testNonMapping() without return types