code: def normalized_adjacency(A, symmetric=True):
      r"""
      Normalizes the given adjacency matrix using the degree matrix as either
      \(\D^{-1}\A\) or \(\D^{-1/2}\A\D^{-1/2}\) (symmetric normalization).
      :param A: rank 2 array or sparse matrix;
      :param symmetric: boolean, compute symmetric normalization;
      :return: the normalized adjacency matrix.
      """
      if symmetric:
          normalized_D = degree_power(A, -0.5)
          return normalized_D.dot(A).dot(normalized_D)
      else:
          normalized_D = degree_power(A, -1.0)
          return normalized_D.dot(A)
  
imports: import copy
  import warnings
  from functools import partial
  import numpy
  import tensorflow
  from scipy import linalg
  from scipy import sparse
  from scipy.sparse.linalg import ArpackNoConvergence
label_desc: Use image node_id 3 for calling a global function with example usage: normalized_adjacency(A, symmetric) and returns: normalized_D, normalized_D