def METHOD_NAME(self, url, subprotocols, header, cookie):
    self.ws = WebSocketApp(
        url=url,
        subprotocols=subprotocols,
        header=header,
        cookie=cookie,
        on_open=self.on_open,
        on_error=self.on_error,
        on_close=self.on_close,
        on_ping=self.on_ping,
        on_pong=self.on_pong,
        on_message=self.on_message,
        on_cont_message=self.on_cont_message,
        on_data=self.on_data,
    )