code: def test_category(version):
      repeats = 1000
      values = ["foo", None, "bar", "qux", np.nan]
      df = pd.DataFrame({"strings": values * repeats})
      df["strings"] = df["strings"].astype("category")
  
      values = ["foo", None, "bar", "qux", None]
      expected = pd.DataFrame(
          {"strings": pd.Categorical(values * repeats)}
      )
      _check_pandas_roundtrip(df, expected, version=version)
  
imports: import io
  import os
  import sys
  import tempfile
  import pytest
  import hypothesis
  import hypothesis.strategies
  import numpy
  import pyarrow
  import pyarrow.tests.strategies
  from pyarrow.feather import read_feather, write_feather, read_table, FeatherDataset
label_desc: Use image node_id 30 for calling a global function with example usage: test_category(version) without return types