code: def test_GCN_Aadj_feats_op(example_graph):
      node_list = list(example_graph.nodes())
      Aadj = example_graph.to_adjacency_matrix()
      features = example_graph.node_features(node_list)
  
      features_, Aadj_ = GCN_Aadj_feats_op(
          features=features, A=Aadj, method="gcn"
      )
      np.testing.assert_array_equal(features, features_)
      assert 6 == pytest.approx(Aadj_.todense().sum(), 0.1)
  
      # k must be positive integer
      with pytest.raises(ValueError):
          GCN_Aadj_feats_op(
              features=features, A=Aadj, method="sgc", k=None
          )
  
      with pytest.raises(ValueError):
          GCN_Aadj_feats_op(
              features=features, A=Aadj, method="sgc", k=0
          )
  
      with pytest.raises(ValueError):
          GCN_Aadj_feats_op(
              features=features, A=Aadj, method="sgc", k=-191
          )
  
      with pytest.raises(ValueError):
          GCN_Aadj_feats_op(
              features=features, A=Aadj, method="sgc", k=2.0
          )
  
      features_, Aadj_ = GCN_Aadj_feats_op(
          features=features, A=Aadj, method="sgc", k=2
      )
  
      assert len(features_) == 6
      np.testing.assert_array_equal(features, features_)
      assert Aadj.get_shape() == Aadj_.get_shape()
  
      # Check if the power of the normalised adjacency matrix is calculated correctly.
      # First retrieve the normalised adjacency matrix using localpool filter.
      features_, Aadj_norm = GCN_Aadj_feats_op(
          features=features, A=Aadj, method="gcn"
      )
      Aadj_norm = Aadj_norm.todense()
      Aadj_power_2 = np.linalg.matrix_power(
          Aadj_norm, 2
      )  # raise it to the power of 2
      # Both matrices should have the same shape
      assert Aadj_power_2.shape == Aadj_.get_shape()
      # and the same values.
      assert pytest.approx(Aadj_power_2) == Aadj_.todense()
  
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 15 for calling a global function with example usage: test_GCN_Aadj_feats_op(example_graph) without return types