[docs]deftimer(f:Callable):"""timer decorator for counting a function's running time."""@wraps(f)# Just for documentation purposes.defwrapper(*args,**kwargs):start=time.time()out=f(*args,**kwargs)delta_t=time.time()-starthours=delta_t//3600delta_t=delta_t%3600minutes=delta_t//60seconds=delta_t%60print(f"Time for running function {f.__name__}:\n"f"{hours} hours, {minutes} minutes and {seconds} seconds")returnoutreturnwrapper