class_docstr: An interface to specify the exchange map and reduce tasks.
  
  Subclasses should implement the `map` and `reduce` static methods.
  `map` method is to transform one input block into multiple output blocks.
  `reduce` is to combine multiple map output blocks. Both methods are
  single-task operations. See `ExchangeScheduler` for how to distribute
  the operations across multiple tasks.
  
  Any custom arguments for `map` and `reduce` methods should be specified by
  setting `map_args` and `reduce_args`.
  
  The concept here is similar to the exchange operator described in
  "Volcano - An Extensible and Parallel Query Evaluation System"
  (https://dl.acm.org/doi/10.1109/69.273032).
class_docstr_tok: ["An","interface","to","specify","the","exchange","map","and","reduce","tasks",".","Subclasses","should","implement","the","`","map","`","and","`","reduce","`","static","methods",".","`","map","`","method","is","to","transform","one","input","block","into","multiple","output","blocks",".","`","reduce","`","is","to","combine","multiple","map","output","blocks",".","Both","methods","are","single-task","operations",".","See","`","ExchangeScheduler","`","for","how","to","distribute","the","operations","across","multiple","tasks",".","Any","custom","arguments","for","`","map","`","and","`","reduce","`","methods","should","be","specified","by","setting","`","map_args","`","and","`","reduce_args","`",".","The","concept","here","is","similar","to","the","exchange","operator","described","in","''","Volcano","-","An","Extensible","and","Parallel","Query","Evaluation","System","''","(","https",":","\/\/dl.acm.org\/doi\/10.1109\/69.273032",")","."]
docstr: Reduce function to be run for each output block.
  
  Args:
      mapper_outputs: List of map output blocks to reduce.
      partial_reduce: Whether should partially or fully reduce.
  
  Returns:
      The reduced block and its metadata.
docstr_tok: ["Reduce","function","to","be","run","for","each","output","block",".","Args",":","mapper_outputs",":","List","of","map","output","blocks","to","reduce",".","partial_reduce",":","Whether","should","partially","or","fully","reduce",".","Returns",":","The","reduced","block","and","its","metadata","."]
code: def reduce(
      *mapper_outputs: List[Block],
      partial_reduce: bool = False,
  ) -> Tuple[Block, BlockMetadata]:
      """
      Reduce function to be run for each output block.
  
      Args:
          mapper_outputs: List of map output blocks to reduce.
          partial_reduce: Whether should partially or fully reduce.
  
      Returns:
          The reduced block and its metadata.
      """
      raise NotImplementedError
  
file_path: ray/python/ray/data/_internal/planner/exchange/interfaces.py
imports: from typing import Any, Dict, List, Optional, Tuple, Union
  from ray.data._internal.execution.interfaces import RefBundle
  from ray.data._internal.stats import StatsDict
  from ray.data.block import Block, BlockMetadata
label_desc: Use image node_id 3 for calling the ExchangeTaskSpec obj's underlying member method code with example usage: obj.reduce() without return types