code: def getLabel(test_data, pred_data):
      r = []
      for i in range(len(test_data)):
          groundTrue = test_data[i]
          predictTopK = pred_data[i]
          pred = list(map(lambda x: x in groundTrue, predictTopK))
          pred = np.array(pred).astype("float")
          r.append(pred)
      return np.array(r).astype("float")
  
imports: import paddle
  from paddle import nn, optimizer
  import numpy
  from paddle import log
  from dataloader import BasicDataset
  from paddle.io import Dataset
  from time import time
  from sklearn.metrics import roc_auc_score
  import random
  import os
  from tqdm import tqdm
label_desc: Use image node_id 8 for calling a global function with example usage: getLabel(test_data, pred_data) and returns: np