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
  
imports: from .None import register_trainer
  from .base import BaseNodeClassificationHetTrainer, EarlyStopping
  import torch
  from torch.optim.lr_scheduler import StepLR, MultiStepLR, ExponentialLR, ReduceLROnPlateau
  import torch.nn.functional
  from ..model import BaseAutoModel
  from .evaluation import get_feval, Logloss
  from typing import Union
  from copy import deepcopy
  from sklearn.metrics import f1_score
  from ...utils import get_logger
  from ...backend import DependentBackend
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