def METHOD_NAME(self):
    @jt.flag_scope(auto_convert_64_to_32=0)
    def test(num_vars, num_ops, seed):
        np.random.seed(seed)
        vars = []
        for _ in range(num_vars):
            vars.append(np.random.rand(1))
        def random_func(vars):
            np.random.seed(seed+1)
            vars = list(vars)
            for i in range(num_ops):
                v1 = len(vars)-1-np.random.randint(num_vars)
                v2 = len(vars)-1-np.random.randint(num_vars)
                rop = "+-*/"[np.random.randint(4)]
                if (rop == '/' or rop == '-') and v1 is v2:
                    rop = '+'
                vout = eval(f"vars[v1]{rop}vars[v2]")
                vars.append(vout)
            if type(vars[i]) == jt.Var:
                for i in range(len(vars)):
                    vars[i].name("v"+str(i))
            return vout
        np_out, np_dout = ngrad(random_func, vars, 1e-7)
        jt_vars = [ jt.array(v) for v in vars ]
        jt_out = random_func(jt_vars)
        assert (np.abs(jt_out.data-np_out) < 1e-5).all(), (jt_out.data, np_out)
        jt_dout = jt.grad(jt_out, jt_vars)
        jt_dout = [ v.data for v in jt_dout ]
        for jt_d, np_d in zip(jt_dout, np_dout):
            assert abs(jt_d - np_d) < 1e-3, f"{jt_d} {np_d}"
    test(1,1,0)
    # test(3,3,1)
    test(3,6,0)
    test(10,100,2)
    test(30,100,4)
    test(50,100,6)