@contextlib.contextmanager
def log_start_finish(msg, logger, level=logging.DEBUG):
    logger.log(level, 'start: ' + msg)
    yield
    logger.log(level, 'finish: ' + msg)
A context manager to log messages with "start: " and "finish: "
dataset/ETHPy150Open UDST/urbansim/urbansim/utils/logutil.py/log_start_finish