human
Here's a good function header given the following:
I wrote the below code

    fun_grad = grad(fun, argnum)
    def vector_dot_grad(*args, **kwargs):
        (args, vector) = (args[:(-1)], args[(-1)])
        return np.tensordot(fun_grad(*args, **kwargs), vector, np.ndim(vector))
    return grad(vector_dot_grad, argnum)

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

def hessian_tensor_product(fun, argnum=0):