code: def process_batch(self, batch, batch_idx) -> None:
      model_input, labels = batch
      model_input = self.context.to_device(model_input)
      with torch.no_grad():
          pred = self.model(model_input)
          _, predicted = torch.max(pred.data, 1)
          for i in range(len(labels)):
              if predicted[i] == 9:
                  self.counts[self.rank]["num_nines"] += 1
          self.counts[self.rank]["total"] += len(labels)
      self.last_index = batch_idx
  
file_path: determined/examples/features/inference_mnist_pytorch/inference.py
imports: import os
  from typing import Any
  import filelock
  import torch
  from torchvision import datasets, transforms
  from determined import pytorch
  from determined.experimental import client
  from determined.pytorch import experimental
label_desc: Use image node_id 2 for calling the ExampleInferenceProcessor obj's underlying member method code with example usage: obj.process_batch(batch, batch_idx) without return types