docstr: Aggregate sorted and partially combined blocks.
docstr_tok: ["Aggregate","sorted","and","partially","combined","blocks","."]
code: def reduce(
      key: str,
      aggs: Tuple[AggregateFn],
      *mapper_outputs: List[Block],
      partial_reduce: bool = False,
  ) -> (Block, BlockMetadata):
      """Aggregate sorted and partially combined blocks."""
      return BlockAccessor.for_block(
          mapper_outputs[0]
      ).aggregate_combined_blocks(
          list(mapper_outputs), key, aggs, finalize=not partial_reduce
      )
  
imports: from typing import Any, Dict, Iterable, List, Optional, Tuple, Union
  from ._internal.table_block import TableBlockAccessor
  from ray.data._internal import sort
  from ray.data._internal.compute import ComputeStrategy
  from ray.data._internal.delegating_block_builder import DelegatingBlockBuilder
  from ray.data._internal.execution.interfaces import TaskContext
  from ray.data._internal.logical.interfaces import LogicalPlan
  from ray.data._internal.logical.operators.all_to_all_operator import Aggregate
  from ray.data._internal.plan import AllToAllStage
  from ray.data._internal.push_based_shuffle import PushBasedShufflePlan
  from ray.data._internal.shuffle import ShuffleOp, SimpleShufflePlan
  from ray.data._internal.sort import SortKey
  from ray.data.aggregate import AggregateFn, Count, Max, Mean, Min, Std, Sum
  from ray.data.aggregate._aggregate import _AggregateOnKeyBase
  from ray.data.block import Block, BlockAccessor, BlockExecStats, BlockMetadata, KeyType, UserDefinedFunction
  from ray.data.context import DataContext
  from ray.data.dataset import DataBatch, Dataset
  from ray.util.annotations import PublicAPI
label_desc: Use image node_id 2 for calling the _GroupbyOp obj's underlying member method code with example usage: obj.reduce(key, aggs) and returns: BlockAccessor