class_docstr: The implementation for shuffle tasks.
  
  This is used by random_shuffle() and repartition().
class_docstr_tok: ["The","implementation","for","shuffle","tasks",".","This","is","used","by","random_shuffle","(",")","and","repartition","(",")","."]
code: def __init__(
      self,
      target_shuffle_max_block_size: int,
      random_shuffle: bool = False,
      random_seed: Optional[int] = None,
      upstream_map_fn: Optional[
          Callable[[Iterable[Block]], Iterable[Block]]
      ] = None,
  ):
      super().__init__(
          map_args=[
              target_shuffle_max_block_size,
              upstream_map_fn,
              random_shuffle,
              random_seed,
          ],
          reduce_args=[random_shuffle, random_seed],
      )
  
file_path: ray/python/ray/data/_internal/planner/exchange/shuffle_task_spec.py
imports: import math
  from typing import Callable, Iterable, List, Optional, Tuple, Union
  import numpy
  from ray.data._internal.dataset_logger import DatasetLogger
  from ray.data._internal.delegating_block_builder import DelegatingBlockBuilder
  from ray.data._internal.planner.exchange.interfaces import ExchangeTaskSpec
  from ray.data.block import Block, BlockAccessor, BlockExecStats, BlockMetadata
  from ray.data.context import MAX_SAFE_BLOCK_SIZE_FACTOR
label_desc: Use image node_id 1 to create a new ShuffleTaskSpec object from inherited base classes: ExchangeTaskSpec with example: obj = ShuffleTaskSpec(target_shuffle_max_block_size, random_shuffle, random_seed, upstream_map_fn)