code: def testMapParallelization(self, function, should_optimize):
      next_nodes = ["ParallelMap"] if should_optimize else ["Map"]
      dataset = (
          dataset_ops.Dataset.range(5)
          .apply(testing.assert_next(next_nodes))
          .map(function)
      )
      options = options_lib.Options()
      options.experimental_optimization.apply_default_optimizations = (
          False
      )
      options.experimental_optimization.map_parallelization = True
      dataset = dataset.with_options(options)
      self.assertDatasetProduces(
          dataset, expected_output=[function(x) for x in range(5)]
      )
  
imports: import functools
  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 constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.ops import control_flow_assert
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import variables
  from tensorflow.python.platform import test
label_desc: Use image node_id 1 for calling the MapParallelizationTest obj's underlying member method code with example usage: obj.testMapParallelization(function, should_optimize) without return types