<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _ws_on_close(self, ws: websocket.WebSocketApp):
 """Callback for closing the websocket connection Args: ws: websocket connection (now closed) """

        self.connected = False
        self.logger.error('Websocket closed')
        self._reconnect_websocket()