decorator and descriptors decorators decorator is function that creates wrapper around another function this wrapper adds some additional functionality to existing code in this tutorialvarious types of decorators are discussed function inside the function and decorator following is the example of function inside the function funcex py def addone(myfunc)def addoneinside( )print("adding one"return myfunc( return addoneinside def subthree( )return result addone(subthree print(subthree( )print(result( ) outputs adding one above code works as followsfunction 'subthreeis defined at lines - which subtract the given number with function 'addone(line has one argument myfuncwhich indicates that 'addonetakes the function as input sincesubthree function has only one input argumenttherefore one argument is set in the function 'addoneinside(line )which is used in return statement (line also"adding oneis printed before returning the value (line in line return value of addone ( function 'addoneinside'is stored in 'resulthence'resultis function which takes one input lastlyvalues are printed at line and note that "adding oneis printed by the result( and value is incremented by one to