code: def send(self, message):
          
          if isinstance(message, bytes):
              message = message.decode("utf8")
  
          with self.send_lock:
              try:
                  self.ws.send(message)
              except socket.error:
                  chat_backend.unsubscribe(self)
docs: Send a single message to the websocket.