def enforce_shopping_cart_enabled(func):
 def func_wrapper(*args, **kwargs):
  '\n        Wrapper function that does the enforcement that\n        the shopping cart feature is enabled\n        '
  if (not is_shopping_cart_enabled()):
   raise Http404
  return func(*args, **kwargs)
 return func_wrapper

def enforce_shopping_cart_enabled ( func ) : def func_wrapper ( * args , ** kwargs ) : if ( not is_shopping_cart_enabled ( ) ) : raise Http404 return func ( * args , ** kwargs ) return func_wrapper
is a decorator that forces a wrapped method to be run in a runtime which has the enable_shopping_cart flag set .