code: def _test_single_mode(layer, sparse=False, edges=False, **kwargs):
      A_in = Input(shape=(None,), sparse=sparse)
      X_in = Input(shape=(F,))
      inputs = [X_in, A_in]
  
      if sparse:
          input_data = [X, sp_matrix_to_sp_tensor(A)]
      else:
          input_data = [X, A]
  
      if edges:
          E_in = Input(shape=(S,))
          inputs.append(E_in)
          input_data.append(E_single)
  
      layer_instance = layer(**kwargs)
      output = layer_instance(inputs)
      model = Model(inputs, output)
  
      output = model(input_data)
  
      assert output.shape == (N, kwargs["channels"])
  
file_path: spektral/tests/test_layers/convolutional/core.py
imports: import itertools
  import numpy
  import tensorflow
  from tensorflow.keras import Input, Model
  from spektral.utils.sparse import sp_matrix_to_sp_tensor
label_desc: Use image node_id 1 for calling a global function with example usage: _test_single_mode(layer, sparse, edges) without return types