def example(f):
    f.wrapped = True
return f

@example
def test1():
    print('test1')

def test2():
    print('test2')
print(test1.wrapped)
print(hasattr(test2, 'wrapped'))
Find all decorated functions in a module