code: def get_acc(adj_rec, adj_label):
      labels_all = adj_label.view(-1).long()
      preds_all = (adj_rec > 0.5).view(-1).long()
      accuracy = (
          preds_all == labels_all
      ).sum().float() / labels_all.size(0)
      return accuracy
  
file_path: dgl/examples/pytorch/vgae/train.py
imports: import argparse
  import os
  import time
  import dgl
  import model
  import numpy
  import scipy.sparse
  import torch
  import torch.nn.functional
  from dgl.data import CiteseerGraphDataset, CoraGraphDataset, PubmedGraphDataset
  from input_data import load_data
  from preprocess import mask_test_edges, mask_test_edges_dgl, preprocess_graph, sparse_to_tuple
  from sklearn.metrics import average_precision_score, roc_auc_score
label_desc: Use image node_id 2 for calling a global function with example usage: get_acc(adj_rec, adj_label) and returns: accuracy