def METHOD_NAME(shape, axis, is_ascend, dtype, is_dyn=False, in_dtype="float32"):
    if is_dyn:
        x = relay.var("x", relay.TensorType([relay.Any()] * len(shape), in_dtype))
    else:
        x = relay.var("x", relay.TensorType(shape, in_dtype))
    z = relay.argsort(x, axis=axis, is_ascend=is_ascend, dtype=dtype)
    func = relay.Function([x], z)
    x_data = np.random.uniform(size=shape).astype(in_dtype)
    if is_ascend:
        ref_res = np.argsort(x_data, axis=axis, kind="stable")
    else:
        ref_res = np.argsort(-x_data, axis=axis, kind="stable")
    if is_dyn:
        backend = "vm"
    else:
        backend = "graph"
    for target, dev in tvm.testing.enabled_targets():
        mod = tvm.ir.IRModule.from_expr(func)
        op_res = relay.create_executor(backend, mod=mod, device=dev, target=target).evaluate()(
            x_data
        )
        tvm.testing.assert_allclose(op_res.numpy(), ref_res.astype(dtype), rtol=1e-5)