from typing import Callable
import functools
import time


def timer_decorator(func: Callable):
    """
    Basic decorator that prints the execution elapsed time of a function.

    :param func func: Function to decorate.
    """
    @functools.wraps(func)
    def wrapper(*args, **kwargs):
        t1 = time.time()
        ret = func(*args, **kwargs)
        t2 = time.time()
        print(f'Function {func.__name__} elapsed time is {(t2-t1):.4f}s')
        return ret
    return wrapper