code: def evaluate(g, features, labels, model):
      model.eval()
      with torch.no_grad():
          output = model(g, features)
          pred = np.where(output.data.cpu().numpy() >= 0, 1, 0)
          score = f1_score(
              labels.data.cpu().numpy(), pred, average="micro"
          )
          return score
  
file_path: dgl/examples/pytorch/gat/train_ppi.py
imports: import dgl.nn
  import numpy
  import torch
  import torch.nn
  import torch.nn.functional
  from dgl.data.ppi import PPIDataset
  from dgl.dataloading import GraphDataLoader
  from sklearn.metrics import f1_score
label_desc: Use image node_id 1 for calling a global function with example usage: evaluate(g, features, labels, model) and returns: score