import time


def timef(fun):
  """
  decorator to record execution time of a function
  """
  def wrapper(*args,**kwargs):
    start = time.time()
    res = fun(*args,**kwargs)
    end = time.time()
    print(f'Function {fun.__name__} took {end-start}s\n')
    return res
  return wrapper