decorator pattern this results in the following output when decorating functionbe careful to take note what the output type of the function you wrap is and also what the output type of the result of the decorator is more often than notyou want to keep the type consistent so functions using the undecorated function do not need to be changed in this examplewe change the type from number to an html string as an examplebut it is not something you usually want to do profiling decorator initiated html wrapper initiated tohtmldecorator called profilingdecorator called inside fib [time elapsed for - fibonacci number for remember that we were able to use class to decorate function because in python everything is an object as long as the object has __call__(methodso it can be used like function nowlet' explore using this property of python in reverse instead of using class to decorate functionlet' use function directly to decorate our fib function function_decorated_ fib py import time def profiling_decorator( )def wrapped_f( )start_time time time(result (nend_time time time(print("[time elapsed for {}{}format(nend_time start_time)return result return wrapped_f @profiling_decorator def fib( )