def _calculate_duration(func):
    """This decorator prints the execution time for the decorated function."""

    @wraps(func)
    def wrapper(*args, **kwargs):
        start = time.monotonic()
        result = func(*args, **kwargs)
        end = time.monotonic()
        total_seconds = round(end - start)
        hours = total_seconds // 3600  # Integer division to get hours
        remaining_seconds = total_seconds % 3600  # Modulo to find remaining seconds
        minutes = remaining_seconds // 60
        seconds = remaining_seconds % 60
        human_time = f"{hours:}:{minutes:0>2}:{seconds:0>2}"
        print(f"Session ran in {total_seconds} seconds ({human_time})")
        return result

    return wrapper
This decorator prints the execution time for the decorated function.
noxfile.py