def timer(fn):
    """
    Timer decorator. Logs execution time of the function.
    """

    @wraps(fn)
    def _perform(*args, **kwargs):
        _, fn_result = _execute_and_profile(fn, *args, **kwargs)
        return fn_result

    return _perform

    Timer decorator. Logs execution time of the function.
    
cakechat/utils/profile.py