code: def test_memory_records_builder_full(magic, compression_type):
      builder = MemoryRecordsBuilder(
          magic=magic,
          compression_type=compression_type,
          batch_size=1024 * 10,
      )
  
      # 1 message should always be appended
      metadata = builder.append(
          key=None, timestamp=None, value=b"M" * 10240
      )
      assert metadata is not None
      assert builder.is_full()
  
      metadata = builder.append(key=None, timestamp=None, value=b"M")
      assert metadata is None
      assert builder.next_offset() == 1
  
file_path: kafka-python/test/record/test_records.py
imports: from __future__ import unicode_literals
  import pytest
  from kafka.record import MemoryRecords, MemoryRecordsBuilder
  from kafka.errors import CorruptRecordException
label_desc: Use image node_id 6 for calling a global function with example usage: test_memory_records_builder_full(magic, compression_type) without return types