code: def test_flatten_let_buffer():
      @tvm.script.ir_module
      class module:
          @T.prim_func
          def main():
              T.func_attr({"from_legacy_te_schedule": True})
  
              # If a pointer defined using a LetStmt,
              A_data: T.handle("int32") = T.call_extern(
                  "dummy_extern_function", dtype="handle"
              )
  
              # and a buffer is backed by that pointer,
              A = T.decl_buffer([1], dtype="float32", data=A_data)
              T.evaluate(A[0])
  
      # then the call to StorageFlatten would result in an exception
      # being thrown.
      tvm.tir.transform.StorageFlatten(64)(module)
  
file_path: tvm/tests/python/tir-transform/test_tir_transform_storage_flatten.py
imports: import tvm
  import tvm.testing
  from tvm import te
  from tvm.driver.build_module import schedule_to_module
  from tvm.script import tir
  from tvm.relay import GlobalVar
label_desc: Use image node_id 5 for calling a global function with example usage: test_flatten_let_buffer() without return types