code: def __init__(
      self,
      magic,
      compression_type,
      is_transactional,
      producer_id,
      producer_epoch,
      base_sequence,
      batch_size,
  ):
      assert magic >= 2
      self._magic = magic
      self._compression_type = compression_type & self.CODEC_MASK
      self._batch_size = batch_size
      self._is_transactional = bool(is_transactional)
      # KIP-98 fields for EOS
      self._producer_id = producer_id
      self._producer_epoch = producer_epoch
      self._base_sequence = base_sequence
  
      self._first_timestamp = None
      self._max_timestamp = None
      self._last_offset = 0
      self._num_records = 0
  
      self._buffer = bytearray(self.HEADER_STRUCT.size)
  
imports: import struct
  import time
  from kafka.record.abc import ABCRecord, ABCRecordBatch, ABCRecordBatchBuilder
  from kafka.record.util import decode_varint, encode_varint, calc_crc32c, size_of_varint
  from kafka.errors import CorruptRecordException, UnsupportedCodecError
  from kafka.codec import gzip_encode, snappy_encode, lz4_encode, zstd_encode, gzip_decode, snappy_decode, lz4_decode, zstd_decode
  import kafka.codec
label_desc: Use image node_id 1 to create a new DefaultRecordBatchBuilder object from inherited base classes: DefaultRecordBase, ABCRecordBatchBuilder with example: obj = DefaultRecordBatchBuilder(magic, compression_type, is_transactional, producer_id, producer_epoch, base_sequence, batch_size)