human
I wrote the below code

    def create_decorator(func, level=None):
        def f(context, *args):
            h = LoggingCapture(context.config, level=level)
            h.inveigle()
            try:
                func(context, *args)
            finally:
                h.abandon()
            v = h.getvalue()
            if v:
                print('Captured    Logging:')
                print(v)
        return f
    if (not args):
        return functools.partial(create_decorator, level=kw.get('level'))
    else:
        return create_decorator(args[0])

What's a good function header?

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

def capture(*args, **kw):