code: def per_class_error(output, target, num_classes):
      per_class_acc = []
      for i in range(num_classes):
          index = np.where(target == i)
          diff = output[index] - target[index]
          corr = np.where(diff == 0)[0].shape[0] / 1.0
          total = index[0].shape[0] / 1.0
          print(corr, total)
          per_class_acc.append(corr / total)
  
      return per_class_acc
  
imports: import os
  import sys
  import time
  import functools
  import logging
  from contextlib import contextmanager
  from functools import wraps
  import numpy
  import torch.nn
  import torch
label_desc: Use image node_id 6 for calling a global function with example usage: per_class_error(output, target, num_classes) and returns: per_class_acc