code: def test_pruner_speedup(model_fn):
      model = model_fn()
      dummy_inputs = (torch.rand(2, 3, 224, 224),)
  
      config_list = [{"op_types": ["Conv2d"], "sparsity": 0.5}]
      traced = concrete_trace(
          model, dummy_inputs, use_operator_patch=True
      )
      config_list = auto_set_denpendency_group_ids(traced, config_list)
  
      pruner = L1NormPruner(model, config_list)
      _, masks = pruner.compress()
      pruner.unwrap_model()
  
      ModelSpeedup(
          model, dummy_inputs, masks, graph_module=traced
      ).speedup_model()
      traced.forward(*dummy_inputs)
  
imports: import pytest
  import torch
  import torchvision.models
  from nni.common.concrete_trace_utils import concrete_trace
  from nni.compression.pruning import L1NormPruner
  from nni.compression.speedup import ModelSpeedup, auto_set_denpendency_group_ids
label_desc: Use image node_id 1 for calling a global function with example usage: test_pruner_speedup(model_fn) without return types