code: def symmetric_normalize_adj(adj):
      """
      Implements symmetric normalization of graphs
      trick described here:
      https://tkipf.github.io/graph-convolutional-networks/]
  
      adj: NxN graph adjacency matrix (2d square numpy array)
      """
      n_atoms = np.where(np.max(adj, axis=1) == 0)[0][0]
      if n_atoms == 0:
          return adj
      orig_shape = adj.shape
      adj = adj[:n_atoms, :n_atoms]
      degree = np.sum(adj, axis=1)
      D = np.diag(degree)
      D_sqrt = np.sqrt(D)
      D_sqrt_inv = np.linalg.inv(D_sqrt)
      sym_norm = D_sqrt_inv.dot(adj)
      sym_norm = sym_norm.dot(D_sqrt_inv)
      new_adj = np.zeros(orig_shape)
      new_adj[:n_atoms, :n_atoms] = sym_norm
      return new_adj
  
imports: import torch.nn
  import torch.nn.parallel
  import torch.backends.cudnn
  from torch.autograd import Variable
  import torch.optim
  import random
  import numpy
  from sklearn.metrics import roc_auc_score
label_desc: Use image node_id 1 for calling a global function with example usage: symmetric_normalize_adj(adj) and returns: new_adj, adj