<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def send_messages(self, topic, partition, *msg):
 """Helper method to send produce requests. Note that msg type *must* be encoded to bytes by user. Passing unicode message will not work, for example you should encode before calling send_messages via something like `unicode_message.encode('utf-8')` All messages will set the message 'key' to None. Arguments: topic (str):
 name of topic for produce request partition (int):
 partition number for produce request *msg (bytes):
 one or more message payloads Returns: ResponseRequest returned by server Raises: FailedPayloadsError: low-level connection error, can be caused by networking failures, or a malformed request. KafkaUnavailableError: all known brokers are down when attempting to refresh metadata. LeaderNotAvailableError: topic or partition is initializing or a broker failed and leadership election is in progress. NotLeaderForPartitionError: metadata is out of sync; the broker that the request was sent to is not the leader for the topic or partition. UnknownTopicOrPartitionError: the topic or partition has not been created yet and auto-creation is not available. AsyncProducerQueueFull: in async mode, if too many messages are unsent and remain in the internal queue. """

        return self._send_messages(topic, partition, *msg)