code: def evaluate(model, G, labels, mask):
      model.eval()
      with torch.no_grad():
          logits = model(G)
          logits = logits[mask]
          labels = labels[mask]
          _, indices = torch.max(logits, dim=1)
          correct = torch.sum(indices == labels)
          return correct.item() * 1.0 / len(labels)
  
file_path: graph4nlp/graph4nlp/pytorch/test/node_classification/node_classification_test.py
imports: import argparse
  import time
  import networkx
  import numpy
  import torch
  import torch.nn
  from dgl import DGLGraph
  from dgl.data import load_data, register_data_args
  from ...data.data import GraphData
  from ...modules.graph_embedding_learning.graphsage import GraphSAGE
  from ...modules.prediction.classification.node_classification.BiLSTMFeedForwardNN import BiLSTMFeedForwardNN
label_desc: Use image node_id 1 for calling a global function with example usage: evaluate(model, G, labels, mask) and returns: unknown