def require_context(f):
 def wrapper(*args, **kwargs):
  if ((not is_admin_context(args[0])) and (not is_user_context(args[0]))):
   raise exception.NotAuthorized()
  return f(*args, **kwargs)
 return wrapper

def require_context ( f ) : def wrapper ( * args , ** kwargs ) : if ( ( not is_admin_context ( args [ 0 ] ) ) and ( not is_user_context ( args [ 0 ] ) ) ) : raise exception . NotAuthorized ( ) return f ( * args , ** kwargs ) return wrapper
raise exception .