code: def evaluate(device, graph, edge_split, model, batch_size):
      model.eval()
      evaluator = Evaluator(name="ogbl-citation2")
      with torch.no_grad():
          node_emb = model.inference(graph, device, batch_size)
          results = []
          for split in ["valid", "test"]:
              src = edge_split[split]["source_node"].to(node_emb.device)
              dst = edge_split[split]["target_node"].to(node_emb.device)
              neg_dst = edge_split[split]["target_node_neg"].to(
                  node_emb.device
              )
              results.append(
                  compute_mrr(
                      model,
                      evaluator,
                      node_emb,
                      src,
                      dst,
                      neg_dst,
                      device,
                  )
              )
      return results
  
file_path: dgl/examples/pytorch/graphsage/link_pred.py
imports: import argparse
  import dgl
  import dgl.nn
  import torch
  import torch.nn
  import torch.nn.functional
  import tqdm
  from dgl.dataloading import as_edge_prediction_sampler, DataLoader, MultiLayerFullNeighborSampler, negative_sampler, NeighborSampler
  from ogb.linkproppred import DglLinkPropPredDataset, Evaluator
label_desc: Use image node_id 3 for calling a global function with example usage: evaluate(device, graph, edge_split, model, batch_size) and returns: results