code: def normalize_adj(mx):
      """Row-normalize matrix: symmetric normalized Laplacian"""
      rowsum = mx.sum(1)
      r_inv_sqrt = torch.pow(rowsum, -0.5).flatten()
      r_inv_sqrt[torch.isinf(r_inv_sqrt)] = 0.0
      r_mat_inv_sqrt = torch.diag(r_inv_sqrt)
  
      return torch.mm(
          torch.mm(mx, r_mat_inv_sqrt).transpose(-1, -2), r_mat_inv_sqrt
      )
  
imports: import os
  import pickle
  from collections import OrderedDict
  import numpy
  import torch
  import torch.nn
  import yaml
  from scipy import sparse
  from sklearn import preprocessing
  from graph4nlp.pytorch.data.data import GraphData
label_desc: Use image node_id 7 for calling a global function with example usage: normalize_adj(mx) and returns: torch