code: def test_meta_schedule_integration_extract_from_resnet():
      mod, params, _ = get_network(
          name="resnet_18", input_shape=[1, 3, 224, 224]
      )
      extracted_tasks = ms.relay_integration.extract_tasks(
          mod, target="llvm", params=params
      )
      expected_task_names = [
          "fused_" + s
          for s in [
              "nn_max_pool2d",
              "nn_adaptive_avg_pool2d",
              "nn_dense_add",
              "nn_conv2d_add",
              "nn_conv2d_add_1",
              "nn_conv2d_add_2",
              "nn_conv2d_add_add_nn_relu",
              "nn_conv2d_add_add_nn_relu_1",
              "nn_conv2d_add_nn_relu",
              "nn_conv2d_add_nn_relu_1",
              "nn_conv2d_add_nn_relu_2",
              "nn_conv2d_add_nn_relu_3",
              "nn_conv2d_add_nn_relu_4",
              "nn_conv2d_add_nn_relu_5",
              "nn_contrib_conv2d_winograd_without_weight_transform_add_add_nn_relu",
              "nn_contrib_conv2d_winograd_without_weight_transform_add_add_nn_relu_1",
              "nn_contrib_conv2d_winograd_without_weight_transform_add_nn_relu",
              "nn_contrib_conv2d_winograd_without_weight_transform_add_nn_relu_1",
              # The two tasks below are purely spatial and are ruled out by AutoScheduler
              "layout_transform",
              "layout_transform_reshape_squeeze",
          ]
      ]
  
      assert len(extracted_tasks) == len(expected_task_names)
      for t in extracted_tasks:
          assert t.task_name in expected_task_names, t.task_name
  
imports: import platform
  import tempfile
  from typing import List
  import numpy
  import pytest
  import tvm
  import tvm.testing
  from tvm import IRModule
  from tvm import meta_schedule
  from tvm import relay, te, tir
  from tvm._ffi import register_func
  from tvm.contrib import graph_executor
  from tvm.ir.transform import PassContext
  from tvm.meta_schedule.database import TuningRecord, Workload
  from tvm.meta_schedule.testing.relay_workload import get_network
  from tvm.meta_schedule.testing.tlcbench import load_quantized_bert_base
  from tvm.meta_schedule.tune_context import _normalize_mod
  from tvm.script import tir
  from tvm.target import Target
label_desc: Use image node_id 2 for calling a global function with example usage: test_meta_schedule_integration_extract_from_resnet() without return types