code: def concat_and_sort(
      blocks: List["pyarrow.Table"], sort_key: "SortKey"
  ) -> "pyarrow.Table":
      import pyarrow.compute as pac
  
      ret = concat(blocks)
      indices = pac.sort_indices(
          ret, sort_keys=sort_key.to_arrow_sort_args()
      )
      return take_table(ret, indices)
  
file_path: ray/python/ray/data/_internal/arrow_ops/transform_pyarrow.py
imports: from typing import TYPE_CHECKING, List, Union
label_desc: Use image node_id 6 for calling a global function with example usage: concat_and_sort(blocks, sort_key) and returns: take_table