code: def timeit(threshold=0):
      
  
      def inner(func):
          @wraps(func)
          def wrapper(*args, **kwargs):
              start = time.time()
              return_value = func(*args, **kwargs)
              end = time.time()
              duration = float(end-start)
              if duration > threshold:
                  logger.info("Execution of '{}{}' took {:2f}s".format(
                      func.__name__, args, duration))
              return return_value
          return wrapper
      return inner
docs: Decorator to log the execution time of a function