warningin the listingwe can see that help function is not working properly now as shown in listing alsodecorator removes the metaclass features 'annotationwill not workas shown in line listing decorator applied to function #addintdecorator py from funcnamedecorator import funcnamedecorator @funcnamedecorator def addintdecorator( :int* :int-int'''add two variables (xy)xintegerpostional argument yintegerkeyword argument returntypeinteger ''return ( + #decorator will be executed when function is called#and function name will be displayed as output as shown belowintadd=addintdecorator( = function nameaddintdecorator print("intadd ="intadd ##problem with decoratorhelp features are not displayed as shown below help(addintdecoratorfollowing are the outputs of help command #help on function wrapper in module funcnamedecorator#wrapper(*args**kwargs #problem with decoratorno output is displayed print(addintdecorator __annotations__{noteit is recommonded to define the decorators in the separate files 'funcnamedecorator pyfile is used here it' not good practice to define decorator in the same fileit may give some undesired results remove problems using functools the above problem can be removed by using two additional lines in listing the listing is saved as listing and lines and are addedwhich solves the problems completely in line 'wrapsis imported from 'functoolslibrary and then it is applied inside the decorator at line listing is same as listing except new decorator which is defined in listing is called at line listing decorator with 'wrapdecorator funcnamedecoratorfunctool py from functools import wraps def funcnamedecoratorfunctool(func)function as input #func is the function to be wrapped @wraps(funcdef printfuncname(*args**kwargs)#take all arguments of function as input print("function name:"func __name__print function name return func(*args**kwargsreturn function with all arguments return printfuncname generalized attribute validation