code: def test_tuple_get_item():
      metatable = {"VirtualDevice": [CPU, GPU]}
  
      # Note that the device copy should be placed after projection rather than before. This is handled by
      # a heuristic in the pass.
      def input():
          return tvm.relay.parse(
              """
              #[version = "0.0.5"]
              def @main(%x: Tensor[(3, 3, 4), float32]) {
                let %t = split(%x, indices_or_sections=3);
                %0 = on_device(%t, virtual_device=meta[VirtualDevice][0]);
                %1 = on_device(%t, virtual_device=meta[VirtualDevice][0]);
                %2 = %0.0;
                %3 = %1.1;
                %4 = subtract(%2, %3);
                on_device(%4, virtual_device=meta[VirtualDevice][1])
              }
          """,
              "from_string",
              None,
              metatable,
          )
  
      def expected():
          return tvm.relay.parse(
              """
              #[version = "0.0.5"]
              def @main(%x {virtual_device=meta[VirtualDevice][0]}: Tensor[(3, 3, 4), float32],
                        virtual_device=meta[VirtualDevice][1]) {
                %0 = split(%x, indices_or_sections=3);
                let %t = on_device(%0, virtual_device=meta[VirtualDevice][0], constrain_result=True);
                %1 = %t.0;
                %2 = on_device(%1, virtual_device=meta[VirtualDevice][0], constrain_result=True);
                %3 = %t.1;
                %4 = on_device(%3, virtual_device=meta[VirtualDevice][0], constrain_result=True);
                %5 = device_copy(%2, src_virtual_device=meta[VirtualDevice][0], dst_virtual_device=meta[VirtualDevice][1]);
                %6 = device_copy(%4, src_virtual_device=meta[VirtualDevice][0], dst_virtual_device=meta[VirtualDevice][1]);
                subtract(%5, %6)
              }
          """,
              "from_string",
              None,
              metatable,
          )
  
      def ref(x):
          t = np.split(x, 3)
          return np.subtract(t[0], t[1])
  
      exercise(input(), expected(), ref, rands((3, 3, 4), 1))
  
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 27 for calling a global function with example usage: test_tuple_get_item() and returns: tvm, tvm, np