code: def test_if():
      @script
      def if_then_else(a):
          b = output_tensor((10,), "int32")
          c = output_tensor((10,), "int32")
          for i in range(10):
              if i % 2 == 0:
                  c[i] = a[i]
              else:
                  c[i] = b[i]
          for i in unroll(10):
              b[i] = -1 if i % 2 == 0 else 1
          return b, c
  
      a = te.placeholder((10,), dtype="int32", name="a")
  
      func, ins, outs = run_and_check(if_then_else, [a])
      run_and_check(func, ins, outs=outs)
  
      @script
      def if_triple_condition(a):
          b = output_tensor((10,), "int32")
          for i in range(10):
              if 0 <= i < 5:
                  b[i] = a[i]
              else:
                  b[i] = a[i] + 1
          return b
  
      func, ins, outs = run_and_check(if_triple_condition, [a])
      run_and_check(func, ins, outs=outs)
  
      @script
      def if_and(a):
          b = output_tensor((10,), "int32")
          for i in range(10):
              if i >= 0 and i < 5:
                  b[i] = a[i]
              else:
                  b[i] = a[i] + 1
          return b
  
      func, ins, outs = run_and_check(if_and, [a])
      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 6 for calling a global function with example usage: test_if() and returns: b,  c, b, b