code: def test_to_arrow_expands_categoricals():
      # Build DataFrame with one categorical column
      df = pd.DataFrame({"a": [1, 2, 3], "b": ["One", "One", "Two"]})
      df["b"] = df["b"].astype("category")
      assert isinstance(df["b"].dtype, pd.CategoricalDtype)
  
      # Convert to pyarrow table
      pa_table = to_arrow_table(df)
  
      # Check that pyarrow type is String (not Dictionary)
      b_type = pa_table.column("b").type
      assert b_type == pa.string()
  
file_path: vegafusion/python/vegafusion/tests/test_transformer.py
imports: import pandas
  import pyarrow
  from decimal import Decimal
  from vegafusion.transformer import to_arrow_table
label_desc: Use image node_id 1 for calling a global function with example usage: test_to_arrow_expands_categoricals() without return types