class_docstr: Serializes a stream of objects in batches by calling its wrapped
  Serializer with streams of objects.
class_docstr_tok: ["Serializes","a","stream","of","objects","in","batches","by","calling","its","wrapped","Serializer","with","streams","of","objects","."]
code: def __init__(self, serializer, batch_size=UNLIMITED_BATCH_SIZE):
      self.serializer = serializer
      self.batch_size = batch_size
  
imports: import pickle
  import struct
  from abc import abstractmethod
  from io import BytesIO
  from itertools import chain
  from typing import TypeVar, Iterable
  from pyflink.common.serializer import TypeSerializer
label_desc: Use image node_id 1 to create a new BatchedSerializer object from inherited base classes: IterableSerializer with example: obj = BatchedSerializer(serializer, batch_size)