def METHOD_NAME(self, timeout, params):
    if not Setting().get(SettingKey.ENABLE_NOTIFICATION_STREAM):
        raise RestException('The notification stream is not enabled.', code=503)
    user, token = self.getCurrentUser(returnToken=True)
    setResponseHeader('Content-Type', 'text/event-stream')
    setResponseHeader('Cache-Control', 'no-cache')
    since = params.get('since')
    if since is not None:
        since = datetime.utcfromtimestamp(since)
    def streamGen():
        lastUpdate = since
        start = time.time()
        wait = MIN_POLL_INTERVAL
        while cherrypy.engine.state == cherrypy.engine.states.STARTED:
            wait = min(wait + MIN_POLL_INTERVAL, MAX_POLL_INTERVAL)
            for event in NotificationModel().get(user, lastUpdate, token=token):
                if lastUpdate is None or event['updated'] > lastUpdate:
                    lastUpdate = event['updated']
                wait = MIN_POLL_INTERVAL
                start = time.time()
                yield sseMessage(event)
            if time.time() - start > timeout:
                break
            time.sleep(wait)
    return streamGen