code: def preprocess_graph(adj):
      adj = sp.coo_matrix(adj)
      adj_ = adj + sp.eye(adj.shape[0])
      rowsum = np.array(adj_.sum(1))
      degree_mat_inv_sqrt = sp.diags(np.power(rowsum, -0.5).flatten())
      adj_normalized = (
          adj_.dot(degree_mat_inv_sqrt)
          .transpose()
          .dot(degree_mat_inv_sqrt)
          .tocoo()
      )
      # return sparse_to_tuple(adj_normalized)
      return sparse_mx_to_torch_sparse_tensor(adj_normalized)
  
file_path: graph4nlp/graph4nlp/pytorch/test/link_prediction/utils.py
imports: import pickle
  import networkx
  import numpy
  import scipy.sparse
  import torch
  from sklearn.metrics import average_precision_score, roc_auc_score
label_desc: Use image node_id 5 for calling a global function with example usage: preprocess_graph(adj) and returns: sparse_mx_to_torch_sparse_tensor