any number of both positional and keyword arguments are collected with starredargument syntaxso they must be sent individuallynot in sequence or dictionary if neededcallers can unpack argument collections into individual arguments with stars in the callas done by the bestoftotal function at the end see for refresher if this code doesn' make sense the first function in this module returns total elapsed time for all calls in tuplealong with the timed function' final return value so callers can verify its operation the second function does similarbut returns the best (minimumtime among all calls instead of the total--more useful if you wish to filter out the impacts of other activity on your computerbut less for tests that run too quickly to produce substantial runtimes to address the prior pointthe last function in this file runs nested total tests within best-of testto get the best-of-totals time the nested total operation can make runtimes more usefulbut we still get the best-of filter this function' code may be easier to understand if you remember that every function is passable objecteven the testing functions themselves from larger perspectivebecause these functions are coded in module filethey become generally useful tools anywhere we wish to import them modules and imports were introduced in and you'll learn more about them in the next part of this bookfor nowsimply import the module and call the function to use one of this file' timers in simple usagethis module is similar to its predecessorbut will be more robust in larger contexts in python againimport timer timer total( pow )[ timer total( str upper'spam'( 'spam'timer bestof( str upper'spam'( - 'spam'timer bestof( pow )[ compare to timer results above returns (timelast call' result / as long as total time timer bestof( timer total str upper'spam'( ( 'spam')timer bestoftotal( str upper'spam'( ( 'spam')the last two calls here calculate the best-of-totals times--the lowest time among runseach of which computes the total time to call str upper , times (roughly corresponding to the total times at the start of this listingthe function used in the last call is really just convenience that maps to the call form preceding itboth return the best-of tuplewhich embeds the last total call' result tuple the benchmarking interlude