Decorator to log start and end of function

    Use of decorator module here ensures that argspec will inspect wrapped
    function, not the decorator itself.
    http://micheles.googlecode.com/hg/decorator/documentation.html

def log_start_end(f):
    """
    Decorator to log start and end of function

    Use of decorator module here ensures that argspec will inspect wrapped
    function, not the decorator itself.
    http://micheles.googlecode.com/hg/decorator/documentation.html
    """
    def inner(f, *args, **kwargs):
        logging.info('Starting %s' % f.__name__)
        res = f(*args, **kwargs)
        logging.info('Finished %s' % f.__name__)
        return res
    return decorator.decorator(inner, f)