human
I wrote the below code

    def new_func(*input_args):
        input_args = input_args[:(- len(grad_outputs))]
        outputs = func(*input_args)
        outputs = _as_tuple(outputs)
        input_args = tuple((x for x in input_args if (isinstance(x, Variable) and x.requires_grad)))
        grad_inputs = torch.autograd.grad(outputs, input_args, grad_outputs)
        return grad_inputs
    return gradcheck(new_func, (inputs + grad_outputs), eps, atol, rtol)

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

def gradgradcheck(func, inputs, grad_outputs, eps=1e-06, atol=1e-05, rtol=0.001):