code: def evaluating_model(model: torch.nn.Module):
      model.eval()
      # testing
      correct = 0
      with torch.no_grad():
          for x, y in test_dataloader:
              x, y = x.to(device), y.to(device)
              logits = model(x)
              preds = torch.argmax(logits, dim=1)
              correct += preds.eq(y.view_as(preds)).sum().item()
      print(f"Accuracy: {100 * correct / len(mnist_test)}%)\n")
  
      return correct / len(mnist_test)
  
imports: import sys
  from typing import Callable, Union, List, Dict, Tuple
  import torch
  import torch.nn.functional
  from torch.optim import Optimizer
  from torch.utils.data import DataLoader
  from torch import Tensor
  from torchvision import datasets, transforms
  from deepspeed import DeepSpeedEngine
  from nni.compression.quantization import LsqQuantizer
  from nni.compression.utils import DeepspeedTorchEvaluator
  from nni.common.types import SCHEDULER
label_desc: Use image node_id 3 for calling a global function with example usage: evaluating_model(model) and returns: unknown