code: def _df_to_pyarrow_table(
      df: Any, *, allow_copy: bool = False
  ) -> pa.Table:
      if not _PYARROW_AVAILABLE or parse_version(pa.__version__) < (
          11,
          0,
      ):
          raise ImportError(
              "pyarrow>=11.0.0 is required for converting a dataframe interchange object"
              " to a Polars dataframe"
          )
  
      import pyarrow.interchange  # noqa: F401
  
      if not allow_copy:
          return _df_to_pyarrow_table_zero_copy(df)
  
      return pa.interchange.from_dataframe(df, allow_copy=True)
  
file_path: polars/py-polars/polars/interchange/from_dataframe.py
imports: from __future__ import annotations
  from typing import TYPE_CHECKING, Any
  import polars._reexport
  from polars.convert import from_arrow
  from polars.dependencies import _PYARROW_AVAILABLE
  from polars.dependencies import pyarrow
  from polars.interchange.dataframe import PolarsDataFrame
  from polars.utils.various import parse_version
label_desc: Use image node_id 2 for calling a global function with example usage: _df_to_pyarrow_table(df) and returns: pa, _df_to_pyarrow_table_zero_copy