code: def send_message(self, message):
          
          if self._error:
              raise compat.saved_exc(self._error)
          elif self._transport is None:
              raise JsonRpcError('not connected')
          self._version.check_message(message)
          self._writer.write(serialize(message))
docs: Send a raw JSON-RPC message.
  
          The *message* argument must be a dictionary containing a valid JSON-RPC
          message according to the version passed into the constructor.