code: def test(dataloader, model, loss_fn):
      model.eval()
      correct = 0
      with torch.no_grad():
          for X, y in dataloader:
              X, y = X.to(device), y.to(device)
              pred = model(X)
              correct += (
                  (pred.argmax(1) == y).type(torch.float).sum().item()
              )
      return correct / len(dataloader.dataset)
  
file_path: nni/nni_assets/hello_hpo/model.py
imports: import nni
  import torch
  from torch import nn
  from torch.utils.data import DataLoader
  from torchvision import datasets
  from torchvision.transforms import ToTensor
label_desc: Use image node_id 2 for calling a global function with example usage: test(dataloader, model, loss_fn) and returns: unknown