class_docstr: A `Dataset` that maps a function over its input and flattens the result.
class_docstr_tok: ["A","`","Dataset","`","that","maps","a","function","over","its","input","and","flattens","the","result","."]
docstr: See `Dataset.flat_map()` for details.
docstr_tok: ["See","`","Dataset.flat_map","(",")","`","for","details","."]
code: def __init__(self, input_dataset, map_func):
      """See `Dataset.flat_map()` for details."""
      self._input_dataset = input_dataset
      self._map_func = structured_function.StructuredFunctionWrapper(
          map_func,
          self._transformation_name(),
          dataset=input_dataset,
          defun_kwargs={"_executor": "SINGLE_THREADED_EXECUTOR"},
      )
      self._structure = (
          self._map_func.output_structure._element_spec
      )  # pylint: disable=protected-access
      variant_tensor = gen_dataset_ops.flat_map_dataset(
          input_dataset._variant_tensor,  # pylint: disable=protected-access
          self._map_func.function.captured_inputs,
          f=self._map_func.function,
          **self._flat_structure,
      )
      super(SingleThreadedFlatMapDataset, self).__init__(
          input_dataset, variant_tensor
      )
  
file_path: tensorflow/tensorflow/python/data/benchmarks/from_tensor_slices_benchmark.py
imports: import numpy
  from tensorflow.python.data.benchmarks import benchmark_base
  from tensorflow.python.data.experimental.ops import get_single_element
  from tensorflow.python.data.ops import dataset_ops
  from tensorflow.python.data.ops import structured_function
  from tensorflow.python.eager import def_function
  from tensorflow.python.framework import sparse_tensor
  from tensorflow.python.ops import gen_dataset_ops
label_desc: Use image node_id 1 to create a new SingleThreadedFlatMapDataset object from inherited base classes: dataset_ops with example: obj = SingleThreadedFlatMapDataset(input_dataset, map_func)