code: def test_simple_loop():
      mod = tvm.IRModule({})
      sum_up = relay.GlobalVar("sum_up")
      i = relay.var("i", shape=[], dtype="int32")
      sb = ScopeBuilder()
      with sb.if_scope(relay.equal(i, relay.const(0, dtype="int32"))):
          sb.ret(i)
      with sb.else_scope():
          one_less = relay.subtract(i, relay.const(1, dtype="int32"))
          rec_call = relay.Call(sum_up, [one_less])
          sb.ret(relay.add(rec_call, i))
      func = relay.Function(
          [i], sb.get(), ret_type=relay.TensorType([], "int32")
      )
      mod[sum_up] = func
      i_data = np.array(10, dtype="int32")
      check_eval(sum_up, [i_data], sum(range(1, 11)), mod=mod)
  
imports: import numpy
  import pytest
  import tvm
  from tvm import testing
  from tvm import nd
  from tvm import relay
  from tvm.runtime import container
  from tvm.relay.backend.interpreter import RefValue, ConstructorValue
  from tvm.relay.scope_builder import ScopeBuilder
label_desc: Use image node_id 9 for calling a global function with example usage: test_simple_loop() without return types