code: def score(logits, labels):
      _, indices = torch.max(logits, dim=1)
      prediction = indices.long().cpu().numpy()
      labels = labels.cpu().numpy()
  
      accuracy = (prediction == labels).sum() / len(prediction)
      micro_f1 = f1_score(labels, prediction, average="micro")
      macro_f1 = f1_score(labels, prediction, average="macro")
  
      return accuracy, micro_f1, macro_f1
  
file_path: AutoGL/test/performance/heterogeneous/dgl/han_base/base.py
imports: import torch
  from sklearn.metrics import f1_score
  from tqdm import tqdm
  from utils import load_data, EarlyStopping
  import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: score(logits, labels) and returns: accuracy,  micro_f1,  macro_f1