code: def _write(self, request):
      
      with sw("serialize_request"):
        request_str = request.SerializeToString()
      with sw("write_request"):
        with catch_websocket_connection_errors():
          self._sock.send(request_str)
docs: Actually serialize and write the request.