from typing import Any
import time


def measure_time(func: Any) -> Any:
    """
    Measures and prints execution time for function.

    Args:
        func: Function to monitor.
    Returns:
        inner function.
    """
    def inner(*args, **kwargs):
        start = time.time()
        try:
            return func(*args, **kwargs)
        finally:
            end = time.time() - start
            print('%s.%s: %f' % (func.__module__, func.__name__, end - start))
    return inner