code: def test_model(model, test_loader, device="cpu"):
      correct, total = 0, 0
      model.eval()
      with torch.no_grad():
          for _, (inputs, targets) in enumerate(test_loader):
              inputs, targets = inputs.to(device), targets.to(device)
              outputs = model(inputs)
              _, predicted = torch.max(outputs.data, 1)
              total += targets.size(0)
              correct += (predicted == targets).sum().item()
  
      return correct, total
  
file_path: BentoML/examples/pytorch_mnist/train.py
imports: import argparse
  import os
  import random
  import model
  import numpy
  import torch
  from sklearn.model_selection import KFold
  from torch import nn
  from torchvision import transforms
  from torchvision.datasets import MNIST
  import bentoml
label_desc: Use image node_id 4 for calling a global function with example usage: test_model(model, test_loader, device) and returns: correct,  total