code: def testOptimizationNestedDataset(self):
      def flat_map_fn(_):
          dataset = dataset_ops.Dataset.from_tensors(0)
          dataset = dataset.apply(
              testing.assert_next(["MemoryCacheImpl"])
          )
          dataset = dataset.skip(
              0
          )  # Should be removed by noop elimination
          dataset = dataset.cache()
          return dataset
  
      dataset = dataset_ops.Dataset.range(1)
      dataset = dataset.flat_map(flat_map_fn)
      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])
  
imports: import functools
  import time
  from absl.testing import parameterized
  import numpy
  from tensorflow.python.data.experimental.ops import batching
  from tensorflow.python.data.experimental.ops import grouping
  from tensorflow.python.data.experimental.ops import scan_ops
  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 dtypes
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import ops
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import random_ops
  from tensorflow.python.ops import variable_scope
  from tensorflow.python.ops import variables
  from tensorflow.python.platform import test
label_desc: Use image node_id 4 for calling the OptimizationTest obj's underlying member method code with example usage: obj.testOptimizationNestedDataset() and returns: dataset