class_docstr: Environment threads are treated as being at function scope
  
  See `TestKeepDuplicateThreadIdxInSameFunction` for background
  information.
  
  If there are multiple functions in an IRModule, the `AttrStmt`
  with key `"thread_extent"` in a single function (represented in
  TVMScript as `T.launch_thread`), these should be treated as a
  definition of a single variable at function scope, and should not
  be de-duplicated.
  
  For this test case, the `AttrStmt` for `"thread_extent"` are
  written explicitly, without using the usual `T.env_thread` and
  `T.launch_thread`, as they cannot represent the duplciate
  Var/IterVar usage across the two PrimFuncs.
class_docstr_tok: ["Environment","threads","are","treated","as","being","at","function","scope","See","`","TestKeepDuplicateThreadIdxInSameFunction","`","for","background","information",".","If","there","are","multiple","functions","in","an","IRModule",",","the","`","AttrStmt","`","with","key","`","``","thread_extent","''","`","in","a","single","function","(","represented","in","TVMScript","as","`","T.launch_thread","`",")",",","these","should","be","treated","as","a","definition","of","a","single","variable","at","function","scope",",","and","should","not","be","de-duplicated",".","For","this","test","case",",","the","`","AttrStmt","`","for","`","``","thread_extent","''","`","are","written","explicitly",",","without","using","the","usual","`","T.env_thread","`","and","`","T.launch_thread","`",",","as","they","can","not","represent","the","duplciate","Var\/IterVar","usage","across","the","two","PrimFuncs","."]
code: def expected(self):
      @I.ir_module
      class mod:
          @T.prim_func
          def kernel_1(A: T.Buffer([256], "float32")):
              threadIdx_x = T.int32()
              T.attr(
                  T.iter_var(
                      threadIdx_x,
                      T.Range(0, 256),
                      "ThreadIndex",
                      "threadIdx.x",
                  ),
                  "thread_extent",
                  256,
              )
              A[threadIdx_x] = A[threadIdx_x] + T.float32(1)
  
          @T.prim_func
          def kernel_2(A: T.Buffer([256], "float32")):
              threadIdx_x = T.int32()
              T.attr(
                  T.iter_var(
                      threadIdx_x,
                      T.Range(0, 256),
                      "ThreadIndex",
                      "threadIdx.x",
                  ),
                  "thread_extent",
                  256,
              )
              A[threadIdx_x] = A[threadIdx_x] + T.float32(1)
  
      return mod
  
imports: import tvm
  import tvm.testing
  from tvm import tir
  from tvm.script import tir, ir
label_desc: Use image node_id 2 for calling the TestDeDuplicateThreadIdxAcrossMultipleFunctions obj's underlying member method code with example usage: obj.expected() and returns: mod