code: def send_raw_packet(self, packet: str):
          
          data = packet + '\r\n'
          log.debug('writing data: %s', repr(data))
          self.transport.write(data.encode())
docs: Encode and put packet string onto write buffer.