from typing import Any
import time


def timer(func) -> Any:
    """
    Decorator used to time a function call.  After function is run, the time
    of the function call will be outputed as a print statement.
    """
    def f(*args, **kwargs):
        before = time.time()
        rv = func(*args, **kwargs)
        after = time.time()
        print(f'{func.__name__} took {after-before:.2f} seconds.')
        return rv
    return f