code: def evaluate(model: torch.nn.Module, test_loader):
      model.eval()
      correct = 0.0
      with torch.no_grad():
          for data, target in test_loader:
              data, target = data.to(device), target.to(device)
              output = model(data)
              pred = output.argmax(dim=1, keepdim=True)
              correct += pred.eq(target.view_as(pred)).sum().item()
      return 100 * correct / len(test_loader.dataset)
  
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 6 for calling a global function with example usage: evaluate(model, test_loader) and returns: unknown