code: def test_batch_roundtrip(self):
      with self.assert_pyarrow_memory_released():
          # make sure that Python -> Go -> Python for record
          # batches works correctly and gets the same data in the end
          schema = self.make_schema()
          batch = self.make_batch()
          schema._export_to_c(self.ptr_schema)
          batch._export_to_c(self.ptr_array)
          del schema
          del batch
  
          c_schema = ffi.new("struct ArrowSchema*")
          c_batch = ffi.new("struct ArrowArray*")
          ptr_schema = int(ffi.cast("uintptr_t", c_schema))
          ptr_batch = int(ffi.cast("uintptr_t", c_batch))
  
          cgotest.importThenExportRecord(
              self.ptr_schema, self.ptr_array, ptr_schema, ptr_batch
          )
          batch_new = pa.RecordBatch._import_from_c(
              ptr_batch, ptr_schema
          )
          assert batch_new == self.make_batch()
          del batch_new
          del c_schema
          del c_batch
  
imports: import contextlib
  import gc
  import os
  import unittest
  import pyarrow
  from pyarrow.cffi import ffi
label_desc: Use image node_id 2 for calling the TestRoundTrip obj's underlying member method code with example usage: obj.test_batch_roundtrip() without return types