code: def _concatenate_chunked_arrays(
      arrs: "pyarrow.ChunkedArray",
  ) -> "pyarrow.ChunkedArray":
      """
      Concatenate provided chunked arrays into a single chunked array.
      """
      from ray.data.extensions import (
          ArrowTensorType,
          ArrowVariableShapedTensorType,
      )
  
      # Single flat list of chunks across all chunked arrays.
      chunks = []
      type_ = None
      for arr in arrs:
          if type_ is None:
              type_ = arr.type
          else:
              if isinstance(
                  type_,
                  (ArrowTensorType, ArrowVariableShapedTensorType),
              ):
                  raise ValueError(
                      "_concatenate_chunked_arrays should only be used on non-tensor "
                      f"extension types, but got a chunked array of type {type_}."
                  )
              assert (
                  type_ == arr.type
              ), f"Types mismatch: {type_} != {arr.type}"
          # Add chunks for this chunked array to flat chunk list.
          chunks.extend(arr.chunks)
      # Construct chunked array on flat list of chunks.
      return pyarrow.chunked_array(chunks, type=type_)
  
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 4 for calling a global function with example usage: _concatenate_chunked_arrays(arrs) and returns: pyarrow