code: def accuracy(pred, target):
      """Compute recall accuracy.
  
      Args:
          pred (Numpy ndarray): Prediction array, should be in shape (B, C)
          target (Numpy ndarray): Ground truth array, should be in shape (B, )
  
      Return:
          correct (Float): Recall accuracy
      """
      # y is network output to be compared with ground truth (int)
      y = np.argmax(pred, axis=1)
      a = (y[:, None] == target).sum()
      correct = np.array(a, "int").sum()
      return correct
  
imports: import json
  import os
  import time
  from glob import glob
  import numpy
  from PIL import Image
  from singa import device, layer, model, opt, tensor
  from tqdm import tqdm
  from transforms import Compose, Normalize, ToTensor
label_desc: Use image node_id 1 for calling a global function with example usage: accuracy(pred, target) and returns: correct