def METHOD_NAME(logger, level=logging.DEBUG, prefix=""):
    """
    Decorator. Times the decorated function and logs a message to the provided logger.
    For Example:
    .. code-block:: python
        import sys
        import logging
        logger = logging.getLogger(__name__)
        logger.addHandler( logging.StreamHandler(sys.stdout) )
        logger.setLevel( logging.INFO )
        @timeLogged(logger, logging.INFO)
        def myfunc(x):
            print x**100
        myfunc(2)
        # Output:
        # 1267650600228229401496703205376
        # myfunc execution took 3.1e-05 seconds
    """
    def _timelogged(func):
        @functools.wraps(func)
        def wrapper(*args, **kwargs):
            start = time.time()
            try:
                return func(*args, **kwargs)
            finally:
                stop = time.time()
                logger.log(level, f"{prefix}{func.__name__} execution took {stop - start} seconds")
        return wrapper
    return _timelogged