code: def cls_acc(output, target, topk=1):
      pred = output.topk(topk, 1, True, True)[1].t()
      correct = pred.eq(target.view(1, -1).expand_as(pred))
      acc = float(
          correct[:topk]
          .reshape(-1)
          .float()
          .sum(0, keepdim=True)
          .cpu()
          .numpy()
      )
      acc = 100 * acc / target.shape[0]
      return acc
  
imports: import torch
  import pandas
  from tqdm import tqdm
  import torch.nn.functional
  import torch.nn
  from autogluon.multimodal import MultiModalPredictor
  from datasets import list_datasets, load_dataset
  from setfit import sample_dataset
  from imagedatasets import build_dataset
  from torch.utils.data import Dataset
label_desc: Use image node_id 1 for calling a global function with example usage: cls_acc(output, target, topk) and returns: acc