code: def test_adt():
      metatable = {"VirtualDevice": [CPU, GPU]}
  
      def input():
          return tvm.relay.parse(
              """
              #[version = "0.0.5"]
              type List[A] {
                Cons(A, List[A]),
                Nil,
              }
              def @main(%x : Tensor[(5, 7), float32], %y : Tensor[(5, 7), float32]) {
                %0 = on_device(%y, virtual_device=meta[VirtualDevice][0], constrain_result=True);
                %1 = Nil;
                %2 = Cons(%0, %1);
                let %l = Cons(%x, %2);
                match? (%l) {
                  Cons(%z, _) => %z
                }
              }
          """,
              "from_string",
              None,
              metatable,
          )
  
      def expected():
          return tvm.relay.parse(
              """
              #[version = "0.0.5"]
              type List[A] {
                Cons(A, List[A]),
                Nil,
              }
              def @main(%x {virtual_device=meta[VirtualDevice][0]}: Tensor[(5, 7), float32], %y {virtual_device=meta[VirtualDevice][0]}: Tensor[(5, 7), float32],
                        virtual_device=meta[VirtualDevice][0]) {
                %0 = Nil;
                %1 = Cons(%y, %0);
                let %l = on_device(Cons(%x, %1), virtual_device=meta[VirtualDevice][0], constrain_result=True);
                match? (%l) {
                  Cons(%z, _) => %z
                }
              }
          """,
              "from_string",
              None,
              metatable,
          )
  
      def ref(x, y):
          l = [x, y]
          return l[0]
  
      exercise(input(), expected(), ref, rands((5, 7), 2))
  
imports: import tvm
  from tvm import relay
  from tvm.script import tir
  import tvm.testing
  import numpy
  import os
label_desc: Use image node_id 34 for calling a global function with example usage: test_adt() and returns: tvm, tvm, l