code: def _find_assignment(stmt, var_name):
      while not isinstance(stmt, tvm.tir.LetStmt):
          stmt = stmt.body
  
      if stmt.var.name != var_name:
          return _find_assignment(stmt.body, var_name)
  
      return stmt
  
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 2 for calling a global function with example usage: _find_assignment(stmt, var_name) and returns: stmt, _find_assignment