human
I wrote the below code

    prefix = msg
    if isinstance(msg, types.FunctionType):
        prefix = msg.func_name
    def wrap_f(func, *arg, **kargs):
        'Raw    timing    function    '
        time1 = time.time()
        res = func(*arg, **kargs)
        time2 = time.time()
        msg = ('%s    took    %0.3f    mins' % (prefix, ((time2 - time1) / 60.0)))
        if debug:
            log.debug(msg)
        else:
            log.info(msg)
        return res
    if isinstance(msg, types.FunctionType):
        return decorator.decorator(wrap_f, msg)
    else:
        return decorator.decorator(wrap_f)

What's a good function header?

=====
What is a Python program to fix = msg?
assistant
#Here is Python program to fix = msg
.

def print_timing(msg=None, debug=False):