With that out of the way, we can talk about decorators. Decorators wrap a function in another function that modifies the original in some way, such as adding functionality, modifying arguments or results, and so on. Decorators are identified by the @foo nomenclature on the line above a function/method definition.
The workhorse of a decorator function is defining the wrapper function within it. In this case, the wrapper function is a nested function that actually does the modification work, though the decorator name is what is called.