docstr: Return a nested list of merge task results. The list at index i
  stores the outputs of the i-th merge task submitted during each
  map-merge round. Each merge task returns a list of outputs because it
  may produce outputs for multiple downstream reduce tasks.
docstr_tok: ["Return","a","nested","list","of","merge","task","results",".","The","list","at","index","i","stores","the","outputs","of","the","i-th","merge","task","submitted","during","each","map-merge","round",".","Each","merge","task","returns","a","list","of","outputs","because","it","may","produce","outputs","for","multiple","downstream","reduce","tasks","."]
code: def pop_merge_results(self) -> List[List[ObjectRef]]:
      """Return a nested list of merge task results. The list at index i
      stores the outputs of the i-th merge task submitted during each
      map-merge round. Each merge task returns a list of outputs because it
      may produce outputs for multiple downstream reduce tasks.
      """
      all_merge_results = self._all_merge_results
      self._all_merge_results = []
      return all_merge_results
  
imports: import math
  from typing import Any, Callable, Dict, List, Optional, Tuple, TypeVar, Union
  import ray
  from ray.data._internal.dataset_logger import DatasetLogger
  from ray.data._internal.execution.interfaces import RefBundle, TaskContext
  from ray.data._internal.planner.exchange.interfaces import ExchangeTaskScheduler, ExchangeTaskSpec
  from ray.data._internal.progress_bar import ProgressBar
  from ray.data._internal.remote_fn import cached_remote_fn
  from ray.data._internal.stats import StatsDict
  from ray.data.block import Block, BlockAccessor, BlockExecStats, BlockMetadata
  from ray.data.context import DataContext
  from ray.types import ObjectRef
  from ray.util.scheduling_strategies import NodeAffinitySchedulingStrategy
label_desc: Use image node_id 3 for calling the _MergeStageIterator obj's underlying member method code with example usage: obj.pop_merge_results() and returns: all_merge_results