def require_aggregate_exists(f):
 @functools.wraps(f)
 def wrapper(context, aggregate_id, *args, **kwargs):
  aggregate_get(context, aggregate_id)
  return f(context, aggregate_id, *args, **kwargs)
 return wrapper

def require_aggregate_exists ( f ) : @ functools . wraps ( f ) def wrapper ( context , aggregate_id , * args , ** kwargs ) : aggregate_get ( context , aggregate_id ) return f ( context , aggregate_id , * args , ** kwargs ) return wrapper
decorator to require the specified aggregate to exist .