Added a decorator to "trace" a function.