@classmethod<EOL><INDENT>def _encode_message_set(cls, messages):<DEDENT>
message_set = []<EOL>for message in messages:<EOL><INDENT>encoded_message = KafkaProtocol._encode_message(message)<EOL>message_set.append(struct.pack('<STR_LIT>' % len(encoded_message), <NUM_LIT:0>,<EOL>len(encoded_message),<EOL>encoded_message))<EOL><DEDENT>return b'<STR_LIT>'.join(message_set)<EOL>
Encode a MessageSet. Unlike other arrays in the protocol,
MessageSets are not length-prefixed

Format
======
MessageSet => [Offset MessageSize Message]
  Offset => int64
  MessageSize => int32