def identical_signature_wrapper(original_function, wrapped_function):
 context = {'__wrapped__': wrapped_function}
 function_def = compile('def {0}({1}):\n    return __wrapped__({2})'.format(original_function.__name__, inspect.formatargspec(*salt.utils.args.get_function_argspec(original_function))[1:(-1)], inspect.formatargspec(formatvalue=(lambda val: ''), *salt.utils.args.get_function_argspec(original_function))[1:(-1)]), '<string>', 'exec')
 six.exec_(function_def, context)
 return wraps(original_function)(context[original_function.__name__])

def identical_signature_wrapper ( original_function , wrapped_function ) : context = { '__wrapped__' : wrapped_function } function_def = compile ( 'def {0}({1}):\n    return __wrapped__({2})' . format ( original_function . __name__ , inspect . formatargspec ( * salt . utils . args . get_function_argspec ( original_function ) ) [ 1 : ( - 1 ) ] , inspect . formatargspec ( formatvalue = ( lambda val : '' ) , * salt . utils . args . get_function_argspec ( original_function ) ) [ 1 : ( - 1 ) ] ) , '<string>' , 'exec' ) six . exec_ ( function_def , context ) return wraps ( original_function ) ( context [ original_function . __name__ ] )
return a function with identical signature as original_functions which will call the wrapped_function .