code: def test_const_range():
      @te.hybrid.script
      def foo(a, b):
          c = output_tensor(a.shape, a.dtype)
          d = output_tensor(a.shape, "int32")
  
          for i in const_range(2):
              for j in const_range(5):
                  c[i, j] = float32(int32(a[i, j]) + b[i, j])
  
          for i in const_range(len(b)):
              for j in const_range(len(b[0])):
                  d[i, j] = int32(a[i, j] + b[i, j])
  
          return c, d
  
      a = te.placeholder((2, 5), name="a", dtype="float32")
      b = [[1, 2, 3, 4, 5], [5, 4, 3, 2, 1]]
      func, ins, outs = run_and_check(foo, [a, b])
      run_and_check(func, ins, outs=outs)
  
      @te.hybrid.script
      def goo(a, b):
          c = output_tensor(a.shape, a.dtype)
          len_b = len(b)
          for i in const_range(len_b * 2):
              if i < len_b:
                  c[i] = a[i] + b[i]
              else:
                  c[i - len_b] = a[i - len_b] + b[i - len_b]
          return c
  
      a = te.placeholder((5,), name="a", dtype="int32")
      b = [1, 2, 3, 4, 5]
      c = goo(a, tvm.runtime.convert(b))
      sch = te.create_schedule(c.op)
      func, ins, outs = run_and_check(goo, [a, b])
      run_and_check(func, ins, outs=outs)
  
      @te.hybrid.script
      def hoo(a, b):
          c = output_tensor(a.shape, a.dtype)
          len_b = len(b)
          for i in range(a.shape[0]):
              for j in const_range(len(b)):
                  d = a[i] * b[j]
                  d += a[i] + b[j]
                  c[i] = d
          return c
  
      a = te.placeholder((5,), name="a", dtype="int32")
      b = [1, 2, 3, 4, 5]
      func, ins, outs = run_and_check(hoo, [a, b])
      run_and_check(func, ins, outs=outs)
  
imports: import tvm, inspect, sys, traceback, numpy, pytest, types, os
  from tvm import te
  from tvm.contrib import utils
  from tvm.te.hybrid import script
  from tvm.te.hybrid.runtime import HYBRID_GLOBALS
  import tvm.testing
label_desc: Use image node_id 17 for calling a global function with example usage: test_const_range() and returns: c,  d, c, c