human
I wrote the below code

    grad_with_loss_func = grad_and_loss(func, argnum)
    @functools.wraps(grad_with_loss_func)
    def wrapped(*args):
        return grad_with_loss_func(*args)[0]
    return wrapped

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

def grad(func, argnum=None):