code: def testAssertNextShort(self):
      dataset = dataset_ops.Dataset.from_tensors(0).apply(
          testing.assert_next(["Root", "Whoops"])
      )
      options = options_lib.Options()
      options.experimental_optimization.apply_default_optimizations = (
          False
      )
      dataset = dataset.with_options(options)
      self.assertDatasetProduces(
          dataset,
          expected_error=(
              errors.InvalidArgumentError,
              "Asserted next 2 transformations but encountered only 1.",
          ),
      )
  
file_path: tensorflow-upstream/tensorflow/python/data/experimental/kernel_tests/assert_next_test.py
imports: from absl.testing import parameterized
  from tensorflow.python.data.experimental.ops import testing
  from tensorflow.python.data.kernel_tests import test_base
  from tensorflow.python.data.ops import dataset_ops
  from tensorflow.python.data.ops import options
  from tensorflow.python.framework import combinations
  from tensorflow.python.framework import errors
  from tensorflow.python.platform import test
label_desc: Use image node_id 4 for calling the AssertNextTest obj's underlying member method code with example usage: obj.testAssertNextShort() without return types