# 1. Add a decorator for counting time to the function: import time def timer(func): def inner(): starttime=time.time() print(starttime) func() stoptime=time.time() print(stoptime) use_time=stoptime-starttime print(use_time) return inner @timeer def test(): time.sleep(10) print("test") test() # 2. Add an authentication decorator to the function: def auth(func): def inner() func() return inner