code: def record_batches(draw, type, rows=None, max_fields=None):
      if isinstance(rows, st.SearchStrategy):
          rows = draw(rows)
      elif rows is None:
          rows = draw(_default_array_sizes)
      elif not isinstance(rows, int):
          raise TypeError("Rows must be an integer")
  
      schema = draw(schemas(type, max_fields=max_fields))
      children = [
          draw(arrays(field.type, size=rows)) for field in schema
      ]
      # TODO(kszucs): the names and schema arguments are not consistent with
      #               Table.from_array's arguments
      return pa.RecordBatch.from_arrays(children, schema=schema)
  
imports: import datetime
  import sys
  import pytest
  import hypothesis
  import hypothesis.strategies
  import hypothesis.extra.numpy
  import numpy
  import pyarrow
label_desc: Use image node_id 11 for calling a global function with example usage: record_batches(draw, type, rows, max_fields) and returns: pa