code: def timeit(method):
      
  
      def timed(*arguments, **kw):
          ts = time.time()
          result = method(*arguments, **kw)
          te = time.time()
  
          sys.stdout.write('Time:  %r %2.2f sec\n' % (method.__name__.strip("_"), te - ts))
          sys.stdout.write('------------------------------------\n')
          sys.stdout.flush()
          return result
  
      return timed
docs: Decorator: Compute the execution time of a function
      :param method: the function
      :return: the method runtime