docstr: Upper bound estimate of record size.
          
code: def estimate_size_in_bytes(cls, magic, compression_type, key, value):
      """Upper bound estimate of record size."""
      assert magic in [0, 1], "Not supported magic"
      # In case of compression we may need another overhead for inner msg
      if compression_type:
          return (
              cls.LOG_OVERHEAD
              + cls.record_overhead(magic)
              + cls.record_size(magic, key, value)
          )
      return cls.LOG_OVERHEAD + cls.record_size(magic, key, value)
  
imports: import struct
  import time
  from kafka.record.abc import ABCRecord, ABCRecordBatch, ABCRecordBatchBuilder
  from kafka.record.util import calc_crc32
  from kafka.codec import gzip_encode, snappy_encode, lz4_encode, lz4_encode_old_kafka, gzip_decode, snappy_decode, lz4_decode, lz4_decode_old_kafka
  import kafka.codec
  from kafka.errors import CorruptRecordException, UnsupportedCodecError
label_desc: Use image node_id 10 for calling the LegacyRecordBatchBuilder obj's underlying member method code with example usage: obj.estimate_size_in_bytes(cls, magic, compression_type, key, value) and returns: unknown, unknown