code: def test_export_import_batch_reader(reader_factory):
      c_stream = ffi.new("struct ArrowArrayStream*")
      ptr_stream = int(ffi.cast("uintptr_t", c_stream))
  
      gc.collect()  # Make sure no Arrow data dangles in a ref cycle
      old_allocated = pa.total_allocated_bytes()
  
      _export_import_batch_reader(ptr_stream, reader_factory)
  
      assert pa.total_allocated_bytes() == old_allocated
  
      # Now released
      with assert_stream_released:
          pa.RecordBatchReader._import_from_c(ptr_stream)
  
imports: import contextlib
  import ctypes
  import gc
  import pyarrow
  import pytest
label_desc: Use image node_id 23 for calling a global function with example usage: test_export_import_batch_reader(reader_factory) without return types