human
I wrote the below code

    def proffunc(fun):
        def profiled_func(*args, **kwargs):
            logging.info('Profiling    function    {0}'.format(fun.__name__))
            try:
                profiler = cProfile.Profile()
                retval = profiler.runcall(fun, *args, **kwargs)
                profiler.dump_stats((filename or '{0}_func.profile'.format(fun.__name__)))
            except IOError:
                logging.exception('Could    not    open    profile    file    {0}'.format(filename))
            return retval
        return profiled_func
    return proffunc

What's a good function header?

Here's a good function header?
assistant
#Here's a good function header.

def profile_func(filename=None):