code: def _find_next(stmt, type):
      search_stack = [stmt]
  
      while search_stack:
          stmt = search_stack.pop()
          if isinstance(stmt, type):
              return stmt
          elif isinstance(stmt, tvm.tir.SeqStmt):
              search_stack.extend(reversed(stmt))
          else:
              search_stack.append(stmt.body)
  
      return None
  
file_path: tvm/tests/python/tir-transform/test_tir_transform_make_packed_api.py
imports: import pytest
  import tvm
  import tvm.testing
  from tvm import te, tir
  from tvm.script import tir, ir
  from tvm.driver.build_module import schedule_to_module
label_desc: Use image node_id 3 for calling a global function with example usage: _find_next(stmt, type) and returns: None, stmt