def decorator_apply(dec, func):
 return FunctionMaker.create(func, 'return decorated(%(signature)s)', dict(decorated=dec(func)), __wrapped__=func)

def decorator_apply ( dec , func ) : return FunctionMaker . create ( func , 'return decorated(%(signature)s)' , dict ( decorated = dec ( func ) ) , __wrapped__ = func )
decorate a function by preserving the signature even if dec is not a signature-preserving decorator .