code: def test_resnet_subgraph(algorithm, workspace_size):
      target = Target("c")
      global_workspace_pool = WorkspacePoolInfo(
          "global_workspace",
          [target],
      )
      tir_mod = ResnetStructure
      tir_mod = _assign_targets_to_primfuncs_irmodule(tir_mod, target)
      tir_mod = _assign_poolinfos_to_allocates_in_irmodule(
          tir_mod, [global_workspace_pool]
      )
      main_func = tir_mod["tvmgen_default_run_model"]
      buffer_info_analysis = tvm.tir.usmp.analysis.extract_buffer_info(
          main_func, tir_mod
      )
      assert buffer_info_analysis.memory_pressure == 7200256
  
      fcreate_array_bi = tvm.get_global_func(
          "tir.usmp.CreateArrayBufferInfo"
      )
      buffer_info_arr = fcreate_array_bi(
          buffer_info_analysis.buffer_info_stmts
      )
      fusmp_algo = tvm.get_global_func(f"tir.usmp.algo.{algorithm}")
      buffer_pool_allocations = fusmp_algo(
          buffer_info_arr, buffer_info_analysis.memory_pressure
      )
  
      buffer_info_map_names = dict()
      for buf_info in buffer_info_arr:
          buffer_info_map_names[buf_info.name_hint] = buf_info
  
      # check conflicts
      _verify_conflicts(
          "sid_7",
          [
              "PaddedInput_1",
              "sid_2",
              "Conv2dOutput_1",
              "PaddedInput_2",
          ],
          buffer_info_map_names,
      )
      _verify_conflicts(
          "Conv2dOutput_3",
          [
              "PaddedInput_3",
              "sid_6",
          ],
          buffer_info_map_names,
      )
      _verify_conflicts(
          "sid_6",
          [
              "Conv2dOutput_2",
              "PaddedInput_2",
              "sid_2",
              "PaddedInput_3",
              "Conv2dOutput_3",
          ],
          buffer_info_map_names,
      )
      _verify_conflicts(
          "Conv2dOutput",
          [
              "sid_8",
              "sid_2",
              "PaddedInput",
          ],
          buffer_info_map_names,
      )
      _verify_conflicts(
          "PaddedInput_3",
          [
              "sid_6",
              "sid_2",
              "Conv2dOutput_3",
          ],
          buffer_info_map_names,
      )
      _verify_conflicts(
          "Conv2dOutput_2",
          [
              "PaddedInput_2",
              "sid_2",
              "sid_6",
          ],
          buffer_info_map_names,
      )
      _verify_conflicts(
          "PaddedInput_1",
          [
              "sid_8",
              "sid_2",
              "sid_7",
              "Conv2dOutput_1",
          ],
          buffer_info_map_names,
      )
      _verify_conflicts(
          "Conv2dOutput_1",
          [
              "sid_7",
              "PaddedInput_1",
              "sid_2",
          ],
          buffer_info_map_names,
      )
      _verify_conflicts(
          "PaddedInput",
          [
              "sid_2",
              "sid_8",
              "Conv2dOutput",
          ],
          buffer_info_map_names,
      )
      _verify_conflicts(
          "sid_8",
          [
              "PaddedInput",
              "sid_2",
              "Conv2dOutput",
              "PaddedInput_1",
          ],
          buffer_info_map_names,
      )
      _verify_conflicts(
          "sid_2",
          [
              "PaddedInput",
              "sid_8",
              "Conv2dOutput",
              "PaddedInput_1",
              "sid_7",
              "Conv2dOutput_1",
              "PaddedInput_2",
              "Conv2dOutput_2",
              "sid_6",
              "PaddedInput_3",
          ],
          buffer_info_map_names,
      )
      _verify_conflicts(
          "PaddedInput_2",
          [
              "sid_7",
              "sid_2",
              "Conv2dOutput_2",
              "sid_6",
          ],
          buffer_info_map_names,
      )
  
      _check_max_workspace_size(
          buffer_pool_allocations, global_workspace_pool, workspace_size
      )
  
imports: import pytest
  import tvm
  from tvm import tir, script
  from tvm.script import tir
  from tvm.tir import stmt_functor
  from tvm.tir.usmp import utils
  from tvm.target import Target
  from tvm import WorkspacePoolInfo, PoolInfoProperties
label_desc: Use image node_id 13 for calling a global function with example usage: test_resnet_subgraph(algorithm, workspace_size) without return types