'Queues a notification for a flow.'

def QueueNotification(self, notification=None, timestamp=None, **kw):

    if (notification is None):
        notification = rdf_flows.GrrNotification(**kw)
    session_id = notification.session_id
    if session_id:
        if (timestamp is None):
            timestamp = self.frozen_timestamp
        notification.timestamp = timestamp
        if (timestamp is None):
            ts_str = 'None'
        else:
            ts_str = int(timestamp)
        key = ('%s!%s' % (session_id, ts_str))
        existing = self.notifications.get(key)
        if (existing is not None):
            if (existing.last_status < notification.last_status):
                self.notifications[key] = notification
        else:
            self.notifications[key] = notification
