def mapcall( )return force(map((lambda xx )range( ))for func in (listcompmapcall)result func( time for this callall callsreturn value func( func( func( print(resultprint('alltime % \nfunc alltimetotal time for all calls print('**map/comp %sround(mapcall alltime listcomp alltime )againto make this fairmap is wrapped in list call in only when run as is in or xthis file prints the following--each decorated function now has label of its own defined by decorator argumentswhich will be more useful when we need to find trace displays mixed in with larger program' outputc:\codepy - testseqs py [ccc]==listcomp [ccc]==listcomp [ccc]==listcomp [ccc]==listcomp [ alltime [mmm]==mapcall [mmm]==mapcall [mmm]==mapcall [mmm]==mapcall [ alltime **map/comp as usualwe can also test interactively to see how the decorator' configuration arguments come into playfrom timerdeco import timer @timer(trace=falseno tracingcollect total time def listcomp( )return [ for in range( ) listcomp( listcomp( listcomp( listcomp alltime listcomp timer object at @timer(trace=truelabel='\ =>'def listcomp( ) decorators turn on tracingcustom label