<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def connect_to_websocket(self):
 """Call this method to make the connection to the Discord websocket This method is not blocking, so you'll probably want to call it after initializating your Pycord object, and then move on with your code. When you want to block on just maintaining the websocket connection, then call ``keep_running``, and it'll block until your application is interrupted. Args: None """

        self.logger.info('Making websocket connection')
        try:
            if hasattr(self, '_ws'):
                self._ws.close()
        except:
            self.logger.debug('Couldn\'t terminate previous websocket connection')
        self._ws = websocket.WebSocketApp(
            self._get_websocket_address() + '?v=6&encoding=json',
            on_message=self._ws_on_message,
            on_error=self._ws_on_error,
            on_close=self._ws_on_close
        )
        self._ws.on_open = self._ws_on_open
        self._ws_run_forever_wrapper = WebSocketRunForeverWrapper(self.logger, self._ws)
        self._ws_run_forever_wrapper.start()