code: def test_generator_adj_normalisation(
      symmetric_normalization, weighted
  ):
      graph = example_graph(feature_size=4, edge_weights=True)
  
      generator = PaddedGraphGenerator(graphs=[graph])
      seq = generator.flow(
          graphs=[0],
          symmetric_normalization=symmetric_normalization,
          weighted=weighted,
      )
  
      adj_norm_seq = seq.normalized_adjs[0].todense()
  
      adj = np.array(
          graph.to_adjacency_matrix(weighted=weighted).todense()
      )
      np.fill_diagonal(adj, 1)
      if symmetric_normalization:
          inv_deg = np.diag(np.sqrt(1.0 / adj.sum(axis=1)))
          adj_norm = inv_deg.dot(adj).dot(inv_deg)
      else:
          inv_deg = np.diag(1.0 / adj.sum(axis=1))
          adj_norm = inv_deg.dot(adj)
  
      np.testing.assert_allclose(np.asarray(adj_norm_seq), adj_norm)
  
imports: from stellargraph.core.graph import *
  from stellargraph.mapper.padded_graph_generator import PaddedGraphGenerator, PaddedGraphSequence
  import numpy
  import pytest
  from ..test_utils.graphs import example_graph_random, example_graph, example_hin_1
label_desc: Use image node_id 13 for calling a global function with example usage: test_generator_adj_normalisation(symmetric_normalization, weighted) without return types