code: def compute_acc(pred, labels):
      """
      Compute the accuracy of prediction given the labels.
      """
      return (th.argmax(pred, dim=1) == labels).float().sum() / len(
          pred
      )
  
file_path: dgl/examples/pytorch/ogb/ogbn-products/graphsage/main.py
imports: import argparse
  import time
  import dgl
  import dgl.nn.pytorch
  import numpy
  import torch
  import torch.nn
  import torch.nn.functional
  import torch.optim
  import tqdm
  from ogb.nodeproppred import DglNodePropPredDataset
label_desc: Use image node_id 1 for calling a global function with example usage: compute_acc(pred, labels) and returns: unknown