code: def _read_key_value(self, pos):
      key_size = struct.unpack_from(">i", self._buffer, pos)[0]
      pos += self.KEY_LENGTH
      if key_size == -1:
          key = None
      else:
          key = self._buffer[pos : pos + key_size].tobytes()
          pos += key_size
  
      value_size = struct.unpack_from(">i", self._buffer, pos)[0]
      pos += self.VALUE_LENGTH
      if value_size == -1:
          value = None
      else:
          value = self._buffer[pos : pos + value_size].tobytes()
      return 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 8 for calling the LegacyRecordBatch obj's underlying member method code with example usage: obj._read_key_value(pos) and returns: key,  value