<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def send(self, data):
 """ This method keeps trying to send a message relying on the run method to reopen the websocket in case it was closed. """

        while not self.stopped():
            try:
                self.ws.send(data)
                return
            except websocket.WebSocketConnectionClosedException:
                # config.LOGGER.debug('WebSocket closed, retrying send.') # TODO(investigate infinite loop)
                time.sleep(0.1)