python decorator

decorator accept function as parameter, and return wrapped function as result.

def hello_f():
print(‘hello’)

wrapper function:

def wrap_fun(func):


# how to wrap the pass in func, define func
def wrapper():
    print('Started the hello')
    func()
    print('Ended the hello')

return wrapper