code: def test_outer_product():
      n = te.size_var("n")
      m = te.size_var("m")
      a = te.placeholder((n,), name="a")
      b = te.placeholder((m,), name="b")
  
      try:
          c = outer_product(n, m, a, b)
          ir = c.op.body
      except IOError as err:
          assert (
              sys.version_info[0] == 2
              and str(err) == "could not get source code"
          )
          return
  
      # Check for i in (0, n)
      assert isinstance(ir, tvm.tir.For)
      assert ir.loop_var.name == "i"
      assert ir.min.value == 0
      assert ir.extent.name == "n"
      ibody = ir.body
      assert isinstance(ibody, tvm.tir.For)
      # Check for j in (0, m)
      assert ibody.loop_var.name == "j"
      assert ibody.min.value == 0
      assert ibody.extent.name == "m"
      # Check loop body
      jblock = ibody.body
      assert isinstance(jblock, tvm.tir.SeqStmt)
      jbody = jblock[0]
      assert isinstance(jbody, tvm.tir.AssertStmt)
      assert isinstance(jbody.message, tvm.tir.StringImm)
      assert jbody.message.value == "index out of range!"
      jbody = jblock[1]
      assert isinstance(jbody, tvm.tir.ProducerStore)
      assert jbody.producer.op.name == "c"
      assert len(jbody.indices) == 2
      assert jbody.indices[0].name == "i"
      assert jbody.indices[1].name == "j"
      assert isinstance(jbody.value, tvm.tir.Mul)
      mul = jbody.value
      assert isinstance(mul.a, tvm.tir.ProducerLoad)
      assert mul.a.producer.name == "a"
      assert mul.b.producer.name == "b"
  
      func, ins, outs = run_and_check(
          outer_product, [n, m, a, b], {n: 99, m: 101}
      )
      temp = utils.tempdir()
      path = temp.relpath("%s.py" % func.name)
      func.save(path)
      func_ = te.hybrid.HybridModule()
      func_.load(path)
      run_and_check(func_, ins, {n: 99, m: 101}, outs=outs)
  
      for key, _ in HYBRID_GLOBALS.items():
          assert key not in globals().keys()
          assert key not in outer_product.__globals__.keys()
  
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 3 for calling a global function with example usage: test_outer_product() without return types