code: def test_e2e_simple(model, predictor):
      model_space = MODELS[model]()
      if model == "custom_op":
          with pytest.raises(
              RuntimeError, match="Shape inference failed"
          ):
              NnMeterProfiler(
                  model_space, torch.randn(1, 1, 28, 28), predictor
              )
          return
      if model == "multihead_attention":
          pytest.skip(
              "MultiheadAttention is not supported by nn-meter yet."
          )
      else:
          profiler = NnMeterProfiler(
              model_space, torch.randn(1, 1, 28, 28), predictor
          )
      sample = {}
      for _ in model_space.grid(memo=sample):
          # TODO: Check the result
          print(sample, profiler.profile(sample))
  
imports: import pytest
  import torch
  from torch import nn
  import nni
  from nni.mutable import Categorical
  from nni.nas.hub.pytorch import *
  from nni.nas.hub.pytorch.mobilenetv3 import SqueezeExcite
  from nni.nas.hub.pytorch.proxylessnas import ConvBNReLU, DepthwiseSeparableConv, InvertedResidual
  from nni.nas.nn.pytorch import MutableConv2d, MutableLinear, LayerChoice, Repeat
  from nni.nas.profiler.pytorch.nn_meter import NnMeterProfiler, to_onnx, combinations
  from nni.nas.profiler.pytorch.utils import MutableShape
  from nn_meter import load_latency_predictor
  from ut.nas.nn.models import MODELS
label_desc: Use image node_id 8 for calling a global function with example usage: test_e2e_simple(model, predictor) without return types