code: def test_GraphConvolution_sparse():
      G, features = create_graph_features()
      n_nodes = features.shape[0]
  
      # We need to specify the batch shape as one for the GraphConvolutional logic to work
      x_t = Input(batch_shape=(1,) + features.shape)
      A_ind = Input(batch_shape=(1, None, 2), dtype="int64")
      A_val = Input(batch_shape=(1, None), dtype="float32")
  
      A_mat = SqueezedSparseConversion(
          shape=(n_nodes, n_nodes), dtype=A_val.dtype
      )([A_ind, A_val])
      out = GraphConvolution(2)([x_t, A_mat])
  
      # Note we add a batch dimension of 1 to model inputs
      adj = G.to_adjacency_matrix().tocoo()
      A_indices = np.expand_dims(
          np.hstack((adj.row[:, None], adj.col[:, None])).astype(
              np.int64
          ),
          0,
      )
      A_values = np.expand_dims(adj.data, 0)
      out_indices = np.array([[0, 1]], dtype="int32")
      x = features[None, :, :]
  
      model = keras.Model(inputs=[x_t, A_ind, A_val], outputs=out)
      preds = model.predict([x, A_indices, A_values], batch_size=1)
      assert preds.shape == (1, 3, 2)
  
      x_t_10 = Input(batch_shape=(10,) + features.shape)
      with pytest.raises(
          ValueError,
          match="features: expected batch dimension = 1 .* found features batch dimension 10",
      ):
          GraphConvolution(2)([x_t_10, A_mat])
  
      A_mat = keras.layers.Lambda(
          lambda x: tf.sparse.expand_dims(x, axis=0)
      )(A_mat)
      with pytest.raises(
          ValueError,
          match="adjacency: expected a single adjacency matrix .* found adjacency tensor of rank 3",
      ):
          GraphConvolution(2)([x_t, A_mat])
  
imports: import stellargraph
  from stellargraph.layer.gcn import *
  from stellargraph.mapper import FullBatchNodeGenerator, FullBatchLinkGenerator
  from stellargraph.core.graph import StellarGraph
  from stellargraph.core.utils import GCN_Aadj_feats_op
  import networkx
  import pandas
  import numpy
  from tensorflow import keras
  import tensorflow
  import pytest
  from ..test_utils.graphs import create_graph_features
  from ..None import test_utils
label_desc: Use image node_id 4 for calling a global function with example usage: test_GraphConvolution_sparse() without return types