code: def test_write_nested_zero_length_array_chunk_failure():
      # Bug report in ARROW-3792
      cols = OrderedDict(
          int32=pa.int32(), list_string=pa.list_(pa.string())
      )
      data = [
          [],
          [
              OrderedDict(int32=1, list_string=("G",)),
          ],
      ]
  
      # This produces a table with a column like
      # <Column name='list_string' type=ListType(list<item: string>)>
      # [
      #   [],
      #   [
      #     [
      #       "G"
      #     ]
      #   ]
      # ]
      #
      # Each column is a ChunkedArray with 2 elements
      my_arrays = [
          pa.array(batch, type=pa.struct(cols)).flatten()
          for batch in data
      ]
      my_batches = [
          pa.RecordBatch.from_arrays(batch, schema=pa.schema(cols))
          for batch in my_arrays
      ]
      tbl = pa.Table.from_batches(my_batches, pa.schema(cols))
      _check_roundtrip(tbl)
  
imports: from collections import OrderedDict
  import io
  import warnings
  from shutil import copytree
  import numpy
  import pytest
  import pyarrow
  from pyarrow import fs
  from pyarrow.filesystem import LocalFileSystem, FileSystem
  from pyarrow.tests import util
  from pyarrow.tests.parquet.common import _check_roundtrip, _roundtrip_table, _test_dataframe
label_desc: Use image node_id 13 for calling a global function with example usage: test_write_nested_zero_length_array_chunk_failure() without return types