def apply_wrapper(wrapper,func):
import nose.tools<EOL>return decorator(wrapper,nose.tools.make_decorator(func)(wrapper))<EOL>
Apply a wrapper to a function for decoration.

    This mixes Michele Simionato's decorator tool with nose's make_decorator,
    to apply a wrapper in a decorator so that all nose attributes, as well as
    function signature and other properties, survive the decoration cleanly.
    This will ensure that wrapped functions can still be well introspected via
    IPython, for example.