code: def _interleave(  # pylint: disable=unused-private-name
      input_dataset,
      map_func,
      cycle_length=None,
      block_length=None,
      num_parallel_calls=None,
      deterministic=None,
      name=None,
  ):
      """See `Dataset.interleave()` for details."""
      if block_length is None:
          block_length = 1
  
      if cycle_length is None:
          cycle_length = dataset_ops.AUTOTUNE
  
      if num_parallel_calls is None or debug_mode.DEBUG_MODE:
          if deterministic is not None and not debug_mode.DEBUG_MODE:
              warnings.warn(
                  "The `deterministic` argument has no effect unless the "
                  "`num_parallel_calls` argument is specified."
              )
          return _InterleaveDataset(
              input_dataset,
              map_func,
              cycle_length,
              block_length,
              name=name,
          )
      else:
          return _ParallelInterleaveDataset(
              input_dataset,
              map_func,
              cycle_length,
              block_length,
              num_parallel_calls,
              deterministic=deterministic,
              name=name,
          )
  
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 for calling a global function with example usage: _interleave(input_dataset, map_func, cycle_length, block_length, num_parallel_calls, deterministic, name) and returns: _InterleaveDataset, _ParallelInterleaveDataset