<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def receive(self, timeout=None):
 """Receive data through websocket"""

        log.debug('Receiving')
        if not self._socket:
            log.warn('No connection')
            return
        try:
            if timeout:
                rv = self._socket.poll(timeout)
                if not rv:
                    log.info('Connection timeouted')
                    return 'Quit'

            data = self._socket.recv_bytes()
        except Exception:
            log.error('Connection lost')
            return 'Quit'
        log.debug('Got %s' % data)
        return data.decode('utf-8')