I think you meant to call `dynamic_debug_decorator` in your last example. Right now the two examples you show are exactly the same (both incorrect). It should be:
@dynamic_debug_decorator()
def function():
pass