code: def test_pandas_can_write_nested_data():
      data = {
          "agg_col": [
              {"page_type": 1},
              {"record_type": 1},
              {"non_consecutive_home": 0},
          ],
          "uid_first": "1001",
      }
      df = pd.DataFrame(data=data)
      arrow_table = pa.Table.from_pandas(df)
      imos = pa.BufferOutputStream()
      # This succeeds under V2
      _write_table(arrow_table, imos)
  
imports: import io
  import json
  import numpy
  import pytest
  import pyarrow
  from pyarrow.fs import LocalFileSystem, SubTreeFileSystem
  from pyarrow.util import guid
  from pyarrow.vendored.version import Version
label_desc: Use image node_id 8 for calling a global function with example usage: test_pandas_can_write_nested_data() without return types