code: def test_lower_floormod():
      data = get_ref_data()
      for dtype in ["int32", "int64", "int16"]:
          x = te.var("x", dtype=dtype)
          y = te.var("y", dtype=dtype)
          zero = tvm.tir.const(0, dtype)
          # no constraints
          res = lower_intrin([x, y], tvm.te.floormod(x, y))
          check_value(res, x, y, data, lambda a, b: a % b)
          # rhs >= 0
          res = lower_intrin(
              [x, y],
              tvm.tir.Select(y >= 0, tvm.te.floormod(x, y), zero),
          )
          check_value(
              res, x, y, data, lambda a, b: a % b if b > 0 else 0
          )
          # lhs >= 0
          res = lower_intrin(
              [x, y],
              tvm.tir.Select(
                  tvm.tir.all(y >= 0, x >= 0),
                  tvm.te.floormod(x, y),
                  zero,
              ),
          )
          check_value(
              res,
              x,
              y,
              data,
              lambda a, b: a % b if b > 0 and a >= 0 else 0,
          )
          # const power of two
          res = lower_intrin(
              [x, y], tvm.te.floormod(x, tvm.tir.const(8, dtype=dtype))
          )
          check_value(
              res,
              x,
              y,
              [(a, b) for a, b in data if b == 8],
              lambda a, b: a % b,
          )
  
file_path: tvm/tests/python/tir-transform/test_tir_transform_lower_intrin.py
imports: import tvm
  import tvm.testing
  from tvm import te
  import numpy
label_desc: Use image node_id 5 for calling a global function with example usage: test_lower_floormod() without return types