human
Complete this python program:
def log_stats(fun):
assistant
#Here is the Python code you requested.

    """Function that will act as a decorator to make logging
    """
    def newfun(env, res):
        'Log    the    execution    time    of    the    passed    function'
        timer = (lambda t: (t.time(), t.clock()))
        (t0, c0) = timer(time)
        executed_function = fun(env, res)
        (t1, c1) = timer(time)
        log_info = '****    Request:    %.2fms/%.2fms    (real    time/cpu    time)'
        log_info = (log_info % (((t1 - t0) * 1000), ((c1 - c0) * 1000)))
        logging.info(log_info)
        return executed_function
    return newfun