decorator pattern def __call__(self*args)print("profilingdecorator called"start_time time time(result self (*argsend_time time time(print("[time elapsed for {}{}format(nend_time start_time)return result class tohtmldecorator(object)def __init__(selff)print("html wrapper initiated"self def __call__(self*args)print("tohtmldecorator called"return "{}format(self (*args)@tohtmldecorator @profilingdecorator def fib( )print("inside fib"if return fibprev fib for num in range( )fibprevfib fibfib fibprev return fib if __name__ ="__main__" print("fibonacci number for {}{}format(nfib( ))