code: def send_message(self, message):
          
          if self.connected:
              self.send(
                  json.dumps(message.request))
docs: Send a message down the socket. The message is expected
          to have a `request` attribute that holds the message to
          be serialized and sent.