code: def test_extract_resnet():
      mod, _params = get_workload()
      expected_op_freqs = {
          "nn.batch_norm": 19,
          "nn.conv2d": 21,
          "nn.relu": 18,
          "nn.max_pool2d": 1,
          "add": 8,
          "nn.global_avg_pool2d": 1,
          "nn.batch_flatten": 1,
          "nn.dense": 1,
          "nn.bias_add": 1,
          "nn.softmax": 1,
      }
      op_freqs = relay.analysis.list_op_freqs(mod)
      assert len(op_freqs) == len(expected_op_freqs)
      assert all(
          [
              op_freqs[op] == expected_op_freqs[op]
              for op in expected_op_freqs
          ]
      )
  
file_path: tvm/tests/python/relay/test_analysis_extract_operators.py
imports: import pytest
  import tvm
  from tvm import relay
  from tvm.relay.testing.resnet import get_workload
  from tvm.relay.testing import run_opt_pass
label_desc: Use image node_id 6 for calling a global function with example usage: test_extract_resnet() without return types