code: def test_from_dataframe_pyarrow_required(monkeypatch: Any) -> None:
      monkeypatch.setattr(
          pl.interchange.from_dataframe, "_PYARROW_AVAILABLE", False
      )
  
      df = pl.DataFrame({"a": [1, 2]})
      with pytest.raises(ImportError, match="pyarrow"):
          pl.from_dataframe(df.to_pandas())
  
      # 'Converting' from a Polars dataframe does not hit this requirement
      result = pl.from_dataframe(df)
      assert_frame_equal(result, df)
  
imports: from __future__ import annotations
  from typing import Any
  import pandas
  import pyarrow
  import pytest
  import polars
  import polars.interchange.from_dataframe
  from polars.testing import assert_frame_equal
label_desc: Use image node_id 9 for calling a global function with example usage: test_from_dataframe_pyarrow_required(monkeypatch) without return types