class_docstr: Defines the protocol for chatting with starcraft.
docstr: Actually serialize and write the request.
docstr_tok: ["Actually","serialize","and","write","the","request","."]
code: def _write(self, request):
      """Actually serialize and write the request."""
      with sw("serialize_request"):
          request_str = request.SerializeToString()
      with sw("write_request"):
          with catch_websocket_connection_errors():
              self._sock.send(request_str)
  
imports: import contextlib
  import enum
  import itertools
  import os
  import socket
  import sys
  import time
  from absl import flags
  from absl import logging
  from pysc2.lib import stopwatch
  import websocket
  from s2clientprotocol import sc2api_pb2
label_desc: Use image node_id 11 for calling the StarcraftProtocol obj's underlying member method code with example usage: obj._write(request) without return types