code: def testNonSerializable(self):
      dataset = dataset_ops.Dataset.from_tensors(0)
      dataset = dataset.apply(testing.assert_next(["FiniteSkip"]))
      dataset = dataset.skip(
          0
      )  # Should not be removed by noop elimination
      dataset = dataset.apply(testing.non_serializable())
      dataset = dataset.apply(testing.assert_next(["MemoryCacheImpl"]))
      dataset = dataset.skip(0)  # Should be removed by noop elimination
      dataset = dataset.cache()
      options = options_lib.Options()
      options.experimental_optimization.apply_default_optimizations = (
          False
      )
      options.experimental_optimization.noop_elimination = True
      dataset = dataset.with_options(options)
      self.assertDatasetProduces(dataset, expected_output=[0])
  
file_path: tensorflow/tensorflow/python/data/experimental/kernel_tests/non_serializable_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.platform import test
label_desc: Use image node_id 1 for calling the NonSerializableTest obj's underlying member method code with example usage: obj.testNonSerializable() without return types