'Marks the given global notification as seen.'

def Handle(self, args, token=None):

    with aff4.FACTORY.Create(aff4.ROOT_URN.Add('users').Add(token.username), aff4_type=aff4_users.GRRUser, mode='rw', token=token) as user_record:
        notifications = user_record.GetPendingGlobalNotifications()
        for notif in notifications:
            if (notif.type == args.type):
                user_record.MarkGlobalNotificationAsShown(notif)
                return
    raise GlobalNotificationNotFoundError()
