parameters: (func)
return_statement: return benchmark_wrapper
docstring: decorator for timing a function
docstring_summary: decorator for timing a function
docstring_tokens: decorator for timing a function
function: def benchmark(func):
      """
      decorator for timing a function
      """
      def benchmark_wrapper(*args, **kwargs):
          started = time.time()
          now = time.strftime("%a, %d %b %Y %H:%M:%S +0000", time.localtime())
          print('function %s called at %s' % (func.__name__, now))
          sys.stdout.flush()
          result = func(*args, **kwargs)
          print('function %s finished after %f seconds' %
                (func.__name__, time.time() - started))
          sys.stdout.flush()
          return result
      return benchmark_wrapper
function_tokens: def benchmark ( func ) : def benchmark_wrapper ( * args , * * kwargs ) : started = time . time ( ) now = time . strftime ( "%a, %d %b %Y %H:%M:%S +0000" , time . localtime ( ) ) print ( 'function %s called at %s' % ( func . __name__ , now ) ) sys . stdout . flush ( ) result = func ( * args , * * kwargs ) print ( 'function %s finished after %f seconds' % ( func . __name__ , time . time ( ) - started ) ) sys . stdout . flush ( ) return result return benchmark_wrapper