public static int recordBatchHeaderSizeInBytes(byte magic, CompressionType compressionType) {
        if (magic > RecordBatch.MAGIC_VALUE_V1) {
            return DefaultRecordBatch.RECORD_BATCH_OVERHEAD;
        } else if (compressionType != CompressionType.NONE) {
            return Records.LOG_OVERHEAD + LegacyRecord.recordOverhead(magic);
        } else {
            return 0;
        }
    }
Return the size of the record batch header.

For V0 and V1 with no compression, it's unclear if Records.LOG_OVERHEAD or 0 should be chosen. There is no header
per batch, but a sequence of batches is preceded by the offset and size. This method returns `0` as it's what
`MemoryRecordsBuilder` requires.
clients/src/main/java/org/apache/kafka/common/record/AbstractRecords.java