code: def test_arrow_array(dtype):
      # protocol added in 0.15.0
      pa = pytest.importorskip("pyarrow")
      import pyarrow.compute as pc
  
      data = pd.array(["a", "b", "c"], dtype=dtype)
      arr = pa.array(data)
      expected = pa.array(
          list(data), type=pa.large_string(), from_pandas=True
      )
      if (
          dtype.storage in ("pyarrow", "pyarrow_numpy")
          and pa_version_under12p0
      ):
          expected = pa.chunked_array(expected)
      if dtype.storage == "python":
          expected = pc.cast(expected, pa.string())
      assert arr.equals(expected)
  
imports: import operator
  import numpy
  import pytest
  from pandas.compat.pyarrow import pa_version_under12p0
  from pandas.core.dtypes.common import is_dtype_equal
  import pandas
  import pandas._testing
  from pandas.core.arrays.string_arrow import ArrowStringArray, ArrowStringArrayNumpySemantics
label_desc: Use image node_id 31 for calling a global function with example usage: test_arrow_array(dtype) without return types