def send(self, message: Any):
        """Send data to the websocket.

        Args:
            message: The data to send.
        """
        if self.websocket:
            if self.mode == DataMode.JSON:
                message = json.dumps(message)
            elif self.mode == DataMode.TEXT:
                message = str(message)
            elif self.mode == DataMode.BYTES:
                message = message.encode("utf-8")
            self.websocket.send(message)
Send data to the websocket.

        Args:
            message: The data to send.
        
lanarky/clients.py