code: def test_stack_overflow():
      metatable = {"VirtualDevice": [CPU, GPU]}
  
      # Everything defaults to GPU
      def input():
          tmp = "test_stack_overflow_input.txt"
          mod = """
              #[version = "0.0.5"]
              def @main(%a: Tensor[(5, 7), float32], %b: Tensor[(5, 7), float32],
                        %c: Tensor[(5, 7), float32], %d: Tensor[(5, 7), float32]) {
              %0 = add(%a, %b);
              %1 = add(%c, %d);
              """
  
          end = 1555
          for i in range(2, end):
              s1 = (
                  "\n\t"
                  + "%"
                  + str(i)
                  + " = add(%"
                  + str(i - 1)
                  + ", %"
                  + str(i - 2)
                  + ");"
              )
              mod += s1
          mod += (
              "\n\t"
              + "add(%"
              + str(end - 1)
              + ", %"
              + str(end - 2)
              + ")"
          )
          mod += "\n\t}"
  
          return tvm.relay.parse(
              mod,
              "from_string",
              None,
              metatable,
          )
  
      config = tvm.target.make_compilation_config(CTXT, TARGETS)
      actual_mod = relay.transform.InferType()(input())
      actual_mod = relay.transform.PlanDevices(config)(actual_mod)
      relay.transform.InferType()(actual_mod)
  
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 37 for calling a global function with example usage: test_stack_overflow() and returns: tvm