def METHOD_NAME(m):
    a = torch.tensor([1.0, 2.0, 3.0])
    if dr.is_cuda_v(m.Float):
        a = a.cuda()
    a.requires_grad = True
    @dr.wrap_ad(source='torch', target='drjit')
    def func2(a, c: int = 4, s: str = '', d: int = 1):
        print(s)
        return a * c * d
    b = func2(a, s='test', c=4)
    b.sum().backward()
    assert dr.allclose(m.Float(b), [4, 8, 12])
    assert dr.allclose(m.Float(a.grad), [4, 4, 4])