def METHOD_NAME(self, ndim, depth, tdim, rdim, has_atomic, order=[], split=[], **args):
    shape = [8]*ndim
    a = jt.random(shape)
    a.sync()
    config = {
        "parallel":1, "max_parallel_depth":depth, "merge_loop_var": self.merge_loop_var
    }
    for k in args:
        config[k] = args[k]
    if not isinstance(rdim, list):
        rdim = [rdim]
    rdim = tuple(rdim)
    nshape = [1024, 256, 128][len(rdim)]
    for d in rdim: shape[d] = nshape
    for i,o in enumerate(order):
        config[f"order{i}"] = o
    for i,o in enumerate(split):
        config[f"split{i}"] = o
    with jt.profile_scope(
        compile_options = config,
        enable_tuner = 0
    ) as rep:
        b = a.sum(rdim).data
    assert len(rep) == 2
    fname = rep[1][1]
    with open(fname) as f:
        src = f.read()
        for i in range(tdim):
            assert f"tnum{i}" in src
        assert f"tnum{tdim}" not in src, f"tnum{tdim}"
        src_has_atomic = "atomic_add" in src or "atomicAdd" in src
        assert has_atomic == src_has_atomic
    assert np.allclose(a.data.sum(rdim), b), (b.sum(), a.data.sum())