class_docstr: Serializes pyarrow.RecordBatch data with Arrow streaming format.
  
  Loads Arrow record batches as `[([pa.RecordBatch], [pa.RecordBatch])]` (one tuple per group)
  and serializes `[([pa.RecordBatch], arrow_type)]`.
  
  Parameters
  ----------
  assign_cols_by_name : bool
      If True, then DataFrames will get columns by name
class_docstr_tok: ["Serializes","pyarrow.RecordBatch","data","with","Arrow","streaming","format",".","Loads","Arrow","record","batches","as","`","[","(","[","pa.RecordBatch","]",",","[","pa.RecordBatch","]",")","]","`","(","one","tuple","per","group",")","and","serializes","`","[","(","[","pa.RecordBatch","]",",","arrow_type",")","]","`",".","Parameters","--","--","--","--","--","assign_cols_by_name",":","bool","If","True",",","then","DataFrames","will","get","columns","by","name"]
docstr: Deserialize Cogrouped ArrowRecordBatches and yield as two `pyarrow.RecordBatch`es.
code: def load_stream(self, stream):
      """
      Deserialize Cogrouped ArrowRecordBatches and yield as two `pyarrow.RecordBatch`es.
      """
      dataframes_in_group = None
  
      while dataframes_in_group is None or dataframes_in_group > 0:
          dataframes_in_group = read_int(stream)
  
          if dataframes_in_group == 2:
              batches1 = [
                  batch
                  for batch in ArrowStreamSerializer.load_stream(
                      self, stream
                  )
              ]
              batches2 = [
                  batch
                  for batch in ArrowStreamSerializer.load_stream(
                      self, stream
                  )
              ]
              yield batches1, batches2
  
          elif dataframes_in_group != 0:
              raise PySparkValueError(
                  error_class="INVALID_NUMBER_OF_DATAFRAMES_IN_GROUP",
                  message_parameters={
                      "dataframes_in_group": str(dataframes_in_group)
                  },
              )
  
imports: from pyspark.errors import PySparkRuntimeError, PySparkTypeError, PySparkValueError
  from pyspark.loose_version import LooseVersion
  from pyspark.serializers import Serializer, read_int, write_int, UTF8Deserializer, CPickleSerializer
  from pyspark.sql.pandas.types import from_arrow_type, to_arrow_type, _create_converter_from_pandas, _create_converter_to_pandas
  from pyspark.sql.types import DataType, StringType, StructType, BinaryType, StructField, LongType, IntegerType
label_desc: Use image node_id 2 for calling the CogroupArrowUDFSerializer obj's underlying member method code with example usage: obj.load_stream(stream) without return types