human
Complete this python program:
def hue_permission_required(action, app):
assistant
#Here is the Python program you requested.

    """Checks that the user has permissions to do
    action \action\ on app \app\.
    Note that user must already be logged in.
    """
    def decorator(view_func):
        @wraps(view_func)
        def decorated(request, *args, **kwargs):
            if (not request.user.has_hue_permission(action, app)):
                raise PopupException((_('Permission    denied    (%(action)s/%(app)s).') % {'action': action, 'app': app}))
            return view_func(request, *args, **kwargs)
        return decorated
    return decorator