code: def test_normalize_adj(example_graph):
      node_list = list(example_graph.nodes())
      Aadj = example_graph.to_adjacency_matrix()
      csr = normalize_adj(Aadj, symmetric=True)
      dense = csr.todense()
      eigen_vals, _ = np.linalg.eig(dense)
      assert eigen_vals.max() == pytest.approx(1, abs=1e-5)
      assert csr.get_shape() == Aadj.get_shape()
  
      # Sum of normalized adjacency matrix is equal to the number of positive degree nodes
      csr = normalize_adj(Aadj, symmetric=False)
      dense = csr.todense()
      num_pos_degree_nodes = (Aadj.sum(axis=1) > 0).sum()
      assert num_pos_degree_nodes == pytest.approx(dense.sum(), 0.1)
      assert csr.get_shape() == Aadj.get_shape()
  
file_path: stellargraph/tests/core/test_utils.py
imports: import pytest
  import numpy
  from stellargraph.core.utils import *
  from ..test_utils import flaky_xfail_mark
  from ..test_utils.graphs import example_graph_random
label_desc: Use image node_id 12 for calling a global function with example usage: test_normalize_adj(example_graph) without return types