class_docstr: A `Dataset` that interleaves the result of transformed inputs.
class_docstr_tok: ["A","`","Dataset","`","that","interleaves","the","result","of","transformed","inputs","."]
docstr: See `Dataset.interleave()` for details.
docstr_tok: ["See","`","Dataset.interleave","(",")","`","for","details","."]
code: def __init__(
      self,
      input_dataset,
      map_func,
      cycle_length,
      block_length,
      name=None,
  ):
      """See `Dataset.interleave()` for details."""
  
      self._input_dataset = input_dataset
      self._map_func = structured_function.StructuredFunctionWrapper(
          map_func, self._transformation_name(), dataset=input_dataset
      )
      if not isinstance(
          self._map_func.output_structure, dataset_ops.DatasetSpec
      ):
          raise TypeError(
              "The `map_func` argument must return a `Dataset` object. Got "
              f"{dataset_ops.get_type(self._map_func.output_structure)!r}."
          )
      self._structure = (
          self._map_func.output_structure._element_spec
      )  # pylint: disable=protected-access
      self._cycle_length = ops.convert_to_tensor(
          cycle_length, dtype=dtypes.int64, name="cycle_length"
      )
      self._block_length = ops.convert_to_tensor(
          block_length, dtype=dtypes.int64, name="block_length"
      )
      self._name = name
      variant_tensor = gen_dataset_ops.interleave_dataset(
          input_dataset._variant_tensor,  # pylint: disable=protected-access
          self._map_func.function.captured_inputs,  # pylint: disable=protected-access
          self._cycle_length,
          self._block_length,
          f=self._map_func.function,
          **self._common_args,
      )
      super().__init__(input_dataset, variant_tensor)
  
imports: import warnings
  from tensorflow.python.data.ops import dataset_ops
  from tensorflow.python.data.ops import debug_mode
  from tensorflow.python.data.ops import structured_function
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.ops import gen_dataset_ops
label_desc: Use image node_id 1 to create a new _InterleaveDataset object from inherited base classes: dataset_ops with example: obj = _InterleaveDataset(input_dataset, map_func, cycle_length, block_length, name)