code: def test_parallel_serial_mixed_for_loops():
      target = Target("c")
      global_ws_pool = WorkspacePoolInfo(
          pool_name="global_workspace",
          targets=[target],
      )
      all_serial_tir_mod = AllSerialForLoops
      all_serial_tir_mod = _assign_targets_to_primfuncs_irmodule(
          all_serial_tir_mod, target
      )
      all_serial_tir_mod = _assign_poolinfos_to_allocates_in_irmodule(
          all_serial_tir_mod, [global_ws_pool]
      )
      main_func = all_serial_tir_mod["run_model"]
      buffer_info_analysis = tvm.tir.usmp.analysis.extract_buffer_info(
          main_func, all_serial_tir_mod
      )
      assert buffer_info_analysis.memory_pressure == 430848
      buffer_info_map = _replace_stmt_with_buf_var_names(
          buffer_info_analysis.buffer_info_stmts
      )
  
      # When all loops are serial all allocates are touched by USMP
      assert len(buffer_info_map) == 3
      for name, _ in buffer_info_map.items():
          assert name in [
              "dummy_allocate",
              "Conv2dOutput_8",
              "PaddedInput_8",
          ]
  
      parallel_serial_mixed_tir_mod = ParallelSerialMixedForLoops
      parallel_serial_mixed_tir_mod = (
          _assign_targets_to_primfuncs_irmodule(
              parallel_serial_mixed_tir_mod, target
          )
      )
      parallel_serial_mixed_tir_mod = (
          _assign_poolinfos_to_allocates_in_irmodule(
              parallel_serial_mixed_tir_mod, [global_ws_pool]
          )
      )
      main_func = parallel_serial_mixed_tir_mod["run_model"]
      buffer_info_analysis = tvm.tir.usmp.analysis.extract_buffer_info(
          main_func, parallel_serial_mixed_tir_mod
      )
      assert buffer_info_analysis.memory_pressure == 430848
      buffer_info_map = _replace_stmt_with_buf_var_names(
          buffer_info_analysis.buffer_info_stmts
      )
  
      # USMP will not touch (yet) the allocates inside parallel for loops
      assert len(buffer_info_map) == 2
      for name, _ in buffer_info_map.items():
          assert name in ["Conv2dOutput_8", "PaddedInput_8"]
  
imports: import pytest
  import sys
  import tvm
  from tvm import tir, script
  from tvm.ir import Range
  from tvm.script import tir
  from tvm.tir import stmt_functor
  from tvm.tir import PrimFunc
  from tvm.tir.usmp import utils
  from tvm.target import Target
  from tvm import WorkspacePoolInfo, ConstantPoolInfo
label_desc: Use image node_id 8 for calling a global function with example usage: test_parallel_serial_mixed_for_loops() without return types