<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_raw_packet(self, packet: str):
 """Encode and put packet string onto write buffer."""

        data = packet + '\r\n'
        log.debug('writing data: %s', repr(data))
        self.transport.write(data.encode())