parameters: (self,
                 input_dataset,
                 map_func,
                 cycle_length,
                 block_length,
                 name=None)
docstring: See `Dataset.interleave()` for details.
docstring_summary: See `Dataset.interleave()` for details.
docstring_tokens: See Dataset . interleave () for details .
function: 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, DatasetSpec):
        raise TypeError(
            "The `map_func` argument must return a `Dataset` object. Got "
            f"{_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(InterleaveDataset, self).__init__(input_dataset, variant_tensor)
function_tokens: def __init__ ( self , input_dataset , map_func , cycle_length , block_length , name = None ) : 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 , DatasetSpec ) : raise TypeError ( "The `map_func` argument must return a `Dataset` object. Got " f"{_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 ( InterleaveDataset , self ) . __init__ ( input_dataset , variant_tensor )