def METHOD_NAME(grads):
    mx.autograd.set_recording(False)
    mx.autograd.backward(*grads.args, **grads.kwargs)
    return convert_recursive(
        lambda x: hasattr(x, "grad"), lambda x: x.grad, inputs
    )