code: def testFlatMap(self):
      ds1 = dataset_ops.Dataset.range(10).repeat(10)
  
      def map_fn(ds):
          def _map(x):
              return ds.batch(x)
  
          return _map
  
      ds2 = dataset_ops.Dataset.range(20).prefetch(1)
      ds2 = ds2.flat_map(map_fn(ds1))
      variant_tensor_ops = traverse.obtain_all_variant_tensor_ops(ds2)
      self.assertSetEqual(
          set(
              [
                  "FlatMapDataset",
                  "PrefetchDataset",
                  "RepeatDataset",
                  "RangeDataset",
                  "RangeDataset_1",
              ]
          ),
          set(x.name for x in variant_tensor_ops),
      )
  
imports: from absl.testing import parameterized
  from tensorflow.python.compat import compat
  from tensorflow.python.data.experimental.ops import data_service_ops
  from tensorflow.python.data.kernel_tests import test_base
  from tensorflow.python.data.ops import dataset_ops
  from tensorflow.python.data.util import traverse
  from tensorflow.python.framework import combinations
  from tensorflow.python.ops import gen_dataset_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.platform import test
label_desc: Use image node_id 6 for calling the TraverseTest obj's underlying member method code with example usage: obj.testFlatMap() and returns: _map, ds