code: def test_conflicated_inputs():
      metatable = {"VirtualDevice": [CPU, GPU]}
  
      def input():
          return tvm.relay.parse(
              """
              #[version = "0.0.5"]
              def @main(%a: Tensor[(5, 7), float32], %b: Tensor[(5, 7), float32],
                          %c: Tensor[(5, 7), float32]) {
                  %0 = add(%a, %b);
                  %1 = on_device(%0, virtual_device=meta[VirtualDevice][0]);
                  %2 = add(%b, %c);
                  %3 = on_device(%2, virtual_device=meta[VirtualDevice][1]);
                  subtract(%1, %3)
              }
              """,
              "from_string",
              None,
              metatable,
          )
  
      def expected():
          return tvm.relay.parse(
              """
              #[version = "0.0.5"]
              def @main(%a {virtual_device=meta[VirtualDevice][0]}: Tensor[(5, 7), float32],
                          %b {virtual_device=meta[VirtualDevice][0]}: Tensor[(5, 7), float32],
                          %c {virtual_device=meta[VirtualDevice][1]}: Tensor[(5, 7), float32]) {
                  %0 = add(%a, %b);
                  %1 = on_device(%0, virtual_device=meta[VirtualDevice][0], constrain_result=True);
                  %2 = device_copy(%b, src_virtual_device=meta[VirtualDevice][0], dst_virtual_device=meta[VirtualDevice][1]);
                  %3 = device_copy(%1, src_virtual_device=meta[VirtualDevice][0], dst_virtual_device=meta[VirtualDevice][1]);
                  %4 = add(%2, %c);
                  subtract(%3, %4)
              }
              """,
              "from_string",
              None,
              metatable,
          )
  
      def ref(a, b, c):
          return np.subtract(np.add(a, b), np.add(b, c))
  
      exercise(input(), expected(), ref, rands((5, 7), 3))
  
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 39 for calling a global function with example usage: test_conflicated_inputs() and returns: tvm, tvm, np