def global_injector_decorator(inject_globals):
 def inner_decorator(f):
  @functools.wraps(f)
  def wrapper(*args, **kwargs):
   with salt.utils.context.func_globals_inject(f, **inject_globals):
    return f(*args, **kwargs)
  return wrapper
 return inner_decorator

def global_injector_decorator ( inject_globals ) : def inner_decorator ( f ) : @ functools . wraps ( f ) def wrapper ( * args , ** kwargs ) : with salt . utils . context . func_globals_inject ( f , ** inject_globals ) : return f ( * args , ** kwargs ) return wrapper return inner_decorator
decorator used by the lazyloader to inject globals into a function at execute time .