@classmethod
    def encode_consumer_metadata_request(cls, client_id, correlation_id, payloads):
        """
        Encode a ConsumerMetadataRequest

        Arguments:
            client_id: string
            correlation_id: int
            payloads: string (consumer group)
        """
        message = []
        message.append(cls._encode_message_header(client_id, correlation_id,
                                                  KafkaProtocol.CONSUMER_METADATA_KEY))
        message.append(struct.pack(len(payloads) % '>h%ds', len(payloads), payloads))

        msg = b''.join(message)
        return write_int_string(msg)
dataset/ETHPy150Open dpkp/kafka-python/kafka/protocol/legacy.py/KafkaProtocol.encode_consumer_metadata_request/swapped operands of `%`