code: def check_minimal_arrow_version() -> None:
      """Verify that the the correct version of pyarrow is installed to support
      the P2P extension.
  
      Raises a ModuleNotFoundError if pyarrow is not installed or an
      ImportError if the installed version is not recent enough.
      """
      minversion = "7.0.0"
      try:
          import pyarrow as pa
      except ModuleNotFoundError:
          raise ModuleNotFoundError(
              f"P2P shuffling requires pyarrow>={minversion}"
          )
      if parse(pa.__version__) < parse(minversion):
          raise ImportError(
              f"P2P shuffling requires pyarrow>={minversion} but only found {pa.__version__}"
          )
  
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 2 for calling a global function with example usage: check_minimal_arrow_version() without return types