code: def test_error_for_repeated_binding():
      """A variable may not be re-defined after the scope ends"""
  
      @T.prim_func
      def func():
          i = T.int32()
          with T.LetStmt(42, var=i):
              T.evaluate(i)
          with T.LetStmt(17, var=i):
              T.evaluate(i)
  
      with pytest.raises(
          ValueError, match="multiple definitions of variable i"
      ):
          tvm.tir.analysis.verify_well_formed(func)
  
file_path: tvm/tests/python/tir-analysis/test_tir_analysis_verify_well_formed.py
imports: import pytest
  import tvm
  import tvm.testing
  from tvm.script import ir, tir
label_desc: Use image node_id 5 for calling a global function with example usage: test_error_for_repeated_binding() without return types