code: def build_resnet18():
      model = resnet18(pretrained=True)
      model.fc = torch.nn.Linear(512, 10)
      return model.to(device)
  
file_path: nni/examples/compression/models.py
imports: from pathlib import Path
  import torch
  import torch.nn.functional
  from torch.optim import Adam
  from torch.optim.lr_scheduler import _LRScheduler
  from torch.utils.data import DataLoader
  from torchvision import datasets, transforms
  from torchvision.models.mobilenetv3 import mobilenet_v3_small
  from torchvision.models.resnet import resnet18
  import nni
label_desc: Use image node_id 2 for calling a global function with example usage: build_resnet18() and returns: model