code: def make_serialized(schema, batches):
      with pa.BufferOutputStream() as sink:
          with pa.ipc.new_stream(sink, schema) as out:
              for batch in batches:
                  out.write(batch)
          return sink.getvalue()
  
imports: import contextlib
  import ctypes
  import gc
  import pyarrow
  import pytest
label_desc: Use image node_id 9 for calling a global function with example usage: make_serialized(schema, batches) and returns: sink