code: def test_arrow():
      test_df = pd.DataFrame(
          {
              "a": np.random.rand(1000),
              "b": np.random.choice(list("abcd"), size=(1000,)),
              "c": np.random.randint(0, 100, size=(1000,)),
          }
      )
      test_vals = [
          pa.RecordBatch.from_pandas(test_df),
          pa.Table.from_pandas(test_df),
      ]
      for val in test_vals:
          deserialized = deserialize(*serialize(val))
          assert type(val) is type(deserialized)
          np.testing.assert_equal(val, deserialized)
  
imports: import threading
  from collections import defaultdict, OrderedDict
  from typing import Any, Dict, List, Tuple
  import numpy
  import pandas
  import pytest
  from ...lib.sparse import SparseMatrix
  from ...tests.core import require_cupy, require_cudf
  from ...utils import lazy_import
  from ..None import serialize, serialize_with_spawn, deserialize
  from ..core import Placeholder, ListSerializer
label_desc: Use image node_id 9 for calling a global function with example usage: test_arrow() without return types