def time_calls(fn):
 @functools.wraps(fn)
 def wrapper(*args, **kwargs):
  _timer = timer(('%s_calls' % get_qualname(fn)))
  with _timer.time(fn=get_qualname(fn)):
   return fn(*args, **kwargs)
 return wrapper

def time_calls ( fn ) : @ functools . wraps ( fn ) def wrapper ( * args , ** kwargs ) : _timer = timer ( ( '%s_calls' % get_qualname ( fn ) ) ) with _timer . time ( fn = get_qualname ( fn ) ) : return fn ( * args , ** kwargs ) return wrapper
decorator to time the execution of the function .