def require_admin_context(ctxt):
    'Raise exception.AdminRequired() if context is an admin context.'
    if (not ctxt.is_admin):
        raise exception.AdminRequired()
Raise exception.AdminRequired() if context is an admin context.
def require_admin_context(ctxt):
    
    if (not ctxt.is_admin):
        raise exception.AdminRequired()