hunk.code_window:         ret = []
           prev_i = 0
           for i in boundary_indices:
               ret.append(table.slice(prev_i, i - prev_i))
               prev_i = i
  
hunk.labels: keep keep keep replace keep
hunk.after_edit:             # Slices need to be copied to avoid including the base table
               # during serialization.
               ret.append(_copy_table(table.slice(prev_i, i - prev_i)))
  
hunk.file_path: python/ray/data/impl/arrow_block.py
hunk.type: replace
file: from typing import Callable, Iterable, List
  
  import numpy as np
  
  from ray.experimental.raysort.types import BlockInfo
  
  
  def get_boundaries(num_parts: int) -> List[int]:
      return [0] * num_parts
  
  
  def sort_and_partition(part: np.ndarray,
                         boundaries: List[int]) -> List[BlockInfo]:
      N = len(boundaries)
      offset = 0
      size = int(np.ceil(part.size / N))
      blocks = []
      for _ in range(N):
          blocks.append((offset, size))
          offset += size
      return blocks
  
  
  def merge_partitions(
          num_blocks: int,
          get_block: Callable[[int, int], np.ndarray]) -> Iterable[memoryview]:
      blocks = [get_block(i, 0) for i in range(num_blocks)]
      for block in blocks:
          yield block
  