code: def get_As(G):
      As = []
      node_list = list(G.nodes())
      node_index = dict(zip(node_list, range(len(node_list))))
  
      for edge_type in G.edge_types:
          col_index = [
              node_index[n1]
              for n1, n2, etype in G.edges(include_edge_type=True)
              if etype == edge_type
          ]
          row_index = [
              node_index[n2]
              for n1, n2, etype in G.edges(include_edge_type=True)
              if etype == edge_type
          ]
          data = np.ones(len(col_index), np.float64)
  
          A = sps.coo_matrix(
              (data, (row_index, col_index)),
              shape=(len(node_list), len(node_list)),
          )
  
          d = sps.diags(
              np.float_power(np.array(A.sum(1)) + 1e-9, -1).flatten(), 0
          )
          A = d.dot(A).tocsr()
          As.append(A)
  
      return As
  
imports: import numpy
  from stellargraph.layer.rgcn import RelationalGraphConvolution, RGCN
  from stellargraph.mapper.full_batch_generators import RelationalFullBatchNodeGenerator
  import pytest
  from scipy import sparse
  from stellargraph.core.utils import normalize_adj
  import tensorflow
  from tensorflow import keras
  from tensorflow.keras import backend
  from tensorflow.keras.layers import Input, Lambda
  from stellargraph import StellarDiGraph, StellarGraph
  from stellargraph.layer.misc import SqueezedSparseConversion
  import pandas
  from ..test_utils.graphs import relational_create_graph_features
  from ..None import test_utils
label_desc: Use image node_id 11 for calling a global function with example usage: get_As(G) and returns: As