code: def concat_arrays(arrays: Iterable[pa.Array]) -> pa.Array:
      import pyarrow as pa
  
      try:
          return pa.concat_arrays(arrays)
      except pa.ArrowNotImplementedError as e:
          if parse(pa.__version__) >= parse("12.0.0"):
              raise
          if e.args[0].startswith("concatenation of extension"):
              raise RuntimeError(
                  "P2P shuffling requires pyarrow>=12.0.0 to support extension types."
              ) from e
          raise
  
file_path: distributed/distributed/shuffle/_arrow.py
imports: from __future__ import annotations
  from collections.abc import Iterable
  from pathlib import Path
  from typing import TYPE_CHECKING
  from packaging.version import parse
  from dask.utils import parse_bytes
label_desc: Use image node_id 9 for calling a global function with example usage: concat_arrays(arrays) and returns: pa