def METHOD_NAME():
    @tvm.script.ir_module
    class Before:
        @R.function
        def foo(x: R.Tensor):
            R.func_attr({"global_symbol": "foo"})
            z = R.call_packed("test.vm.add", x, x, sinfo_args=(R.Tensor))
            return z
    @tvm.script.ir_module
    class Expected:
        @T.prim_func
        def __vmtir__foo(ctx_ptr: T.handle, r: T.handle, c: T.handle, f: T.handle):
            T.func_attr({"global_symbol": "__vmtir__foo"})
            T.anylist_setitem_call_packed(
                r,
                T.int32(2),
                "test.vm.add",
                T.anylist_getitem(r, T.int32(0)),
                T.anylist_getitem(r, T.int32(0)),
            )
            T.anylist_setitem_call_packed(
                r, T.int32(1), "vm.builtin.copy", T.anylist_getitem(r, T.int32(2))
            )
    before = Before
    expected = Expected
    after = get_tir_mod(before)
    assert_structural_equal(expected, after)