human
Complete this python program:
def admin_required(reviewers=False):
assistant
#Here is the Python code you requested.

    """Admin, or someone with AdminTools:View, required.
    If reviewers=True        ReviewerAdminTools:View is allowed also.
    """
    def decorator(f):
        @login_required
        @functools.wraps(f)
        def wrapper(request, *args, **kw):
            admin = (action_allowed(request, 'Admin', '%') or action_allowed(request, 'AdminTools', 'View'))
            if (reviewers is True):
                admin = (admin or action_allowed(request, 'ReviewerAdminTools', 'View'))
            if admin:
                return f(request, *args, **kw)
            raise PermissionDenied
        return wrapper
    if callable(reviewers):
        return decorator(reviewers)
    else:
        return decorator