code: def _test_combinations():
      def make_range():
          return dataset_ops.Dataset.range(10)
  
      def fn_with_side_effect(arg):
          logging_ops.print_v2(arg)
          return arg
  
      # Test case for map function with capture args
      def apply_map_with_capture(ds):
          const = constant_op.constant(-1, dtype=dtypes.int64)
          return ds.map(lambda x: (x, const))
  
      # Test case for map functions with multiple components
      def apply_map_with_multiple_components(ds):
          ds = ds.map(
              lambda x: (x, x), num_parallel_calls=2
          )  # Not eliminated
          return ds.map(lambda x, y: (x, y))  # Eliminated
  
      parallel_map_name = "ParallelMap"
  
      cases = [
          ("Skip0", lambda ds: ds.skip(0), None),
          ("SkipN", lambda ds: ds.skip(5), "FiniteSkip"),
          ("Repeat1", lambda ds: ds.repeat(1), None),
          ("RepeatN", lambda ds: ds.repeat(10), "FiniteRepeat[0]"),
          ("Prefetch0", lambda ds: ds.prefetch(0), None),
          ("PrefetchN", lambda ds: ds.prefetch(1), "Prefetch"),
          ("Take-1", lambda ds: ds.take(-1), None),
          ("TakeN", lambda ds: ds.take(2), "FiniteTake"),
          ("MapIdentity", lambda ds: ds.map(lambda x: x), None),
          ("MapNonIdentity", lambda ds: ds.map(lambda x: x * 2), "Map"),
          (
              "MapWithSideEffect",
              lambda ds: ds.map(fn_with_side_effect),
              "Map",
          ),
          ("MapWithCapture", apply_map_with_capture, "Map"),
          (
              "MapWithMultipleComponents",
              apply_map_with_multiple_components,
              parallel_map_name,
          ),
          (
              "MapRestructure",
              lambda ds: ds.map(lambda x: {"value": x}),
              "",
          ),
          (
              "PMapIdentity",
              lambda ds: ds.map(lambda x: x, num_parallel_calls=2),
              None,
          ),
          (
              "PMapNonIdentity",
              lambda ds: ds.map(lambda x: x * 2, num_parallel_calls=2),
              parallel_map_name,
          ),
          ("Shard1", lambda ds: ds.shard(1, 0), None),
          ("ShardN", lambda ds: ds.shard(2, 0), "Shard"),
      ]
  
      def reduce_fn(result, case):
          name, transformation, expected = case
          return result + combinations.combine(
              init_dataset_fn=make_range,
              transformation=combinations.NamedObject(
                  name, transformation
              ),
              expected_name=expected,
          )
  
      test_combinations = functools.reduce(reduce_fn, cases, [])
  
      return test_combinations
  
file_path: tensorflow/tensorflow/python/data/experimental/kernel_tests/optimization/noop_elimination_test.py
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.ops import logging_ops
  from tensorflow.python.platform import test
label_desc: Use image node_id 1 for calling a global function with example usage: _test_combinations() and returns: test_combinations, dataset_ops, arg, ds, ds, unknown