class_docstr: A generic shuffle operator. Callers should first implement the `map` and
  `reduce` static methods then choose a plan to execute the shuffle by
  inheriting from the appropriate class. A SimpleShufflePlan is provided
  below. Any custom arguments for map and reduce tasks should be specified by
  setting `ShuffleOp._map_args` and `ShuffleOp._reduce_args`.
class_docstr_tok: ["A","generic","shuffle","operator",".","Callers","should","first","implement","the","`","map","`","and","`","reduce","`","static","methods","then","choose","a","plan","to","execute","the","shuffle","by","inheriting","from","the","appropriate","class",".","A","SimpleShufflePlan","is","provided","below",".","Any","custom","arguments","for","map","and","reduce","tasks","should","be","specified","by","setting","`","ShuffleOp._map_args","`","and","`","ShuffleOp._reduce_args","`","."]
docstr: Map function to be run on each input block.
  
  Returns list of [BlockMetadata, O1, O2, O3, ...output_num_blocks].
docstr_tok: ["Map","function","to","be","run","on","each","input","block",".","Returns","list","of","[","BlockMetadata",",","O1",",","O2",",","O3",",","...","output_num_blocks","]","."]
code: def map(
      idx: int,
      block: Block,
      output_num_blocks: int,
      *map_args: List[Any],
  ) -> List[Union[BlockMetadata, Block]]:
      """
      Map function to be run on each input block.
  
      Returns list of [BlockMetadata, O1, O2, O3, ...output_num_blocks].
      """
      raise NotImplementedError
  
file_path: ray/python/ray/data/_internal/shuffle.py
imports: from typing import Any, Dict, List, Optional, Tuple, Union
  from ray.data._internal.block_list import BlockList
  from ray.data._internal.execution.interfaces import TaskContext
  from ray.data._internal.progress_bar import ProgressBar
  from ray.data._internal.remote_fn import cached_remote_fn
  from ray.data.block import Block, BlockMetadata
label_desc: Use image node_id 2 for calling the ShuffleOp obj's underlying member method code with example usage: obj.map(idx, block, output_num_blocks) without return types