async def METHOD_NAME(self, existing_session_id=None) -> WebSocketClientConnection:
    """Open a websocket connection to the server.
    Returns
    -------
    WebSocketClientConnection
        The connected websocket client.
    """
    # See the comment in WebsocketConnection.tsx about how we repurpose the
    # Sec-WebSocket-Protocol header for more information on how this works.
    if existing_session_id is None:
        subprotocols = ["streamlit"]
    else:
        subprotocols = ["streamlit", existing_session_id]
    return await tornado.websocket.websocket_connect(
        self.get_ws_url("/_stcore/stream"),
        subprotocols=subprotocols,
    )