def METHOD_NAME(m):
    a = m.TensorXf(m.Float([1.0, 2.0, 3.0]), shape=[3])
    b = m.TensorXf(m.Float([4.0, 5.0, 6.0]), shape=[3])
    dr.enable_grad(a, b)
    @dr.wrap_ad(source='drjit', target='torch')
    def func(a, b):
        return a * 4 + b * 3
    c = func(a, b)
    dr.backward(dr.sum(c))
    assert dr.allclose(c, [16, 23, 30])
    assert dr.allclose(dr.grad(a), [4, 4, 4])
    assert dr.allclose(dr.grad(b), [3, 3, 3])