code: def test_graphsage_apply_1():
      gs = GraphSAGE(
          layer_sizes=[2, 2, 2],
          n_samples=[2, 2, 2],
          bias=False,
          input_dim=2,
          multiplicity=1,
          normalize=None,
          kernel_initializer="ones",
      )
  
      inp = [keras.Input(shape=(i, 2)) for i in [1, 2, 4, 8]]
      out = gs(inp)
      model = keras.Model(inputs=inp, outputs=out)
  
      x = [
          np.array([[[1, 1]]]),
          np.array([[[2, 2], [2, 2]]]),
          np.array([[[3, 3], [3, 3], [3, 3], [3, 3]]]),
          np.array(
              [
                  [
                      [4, 4],
                      [4, 4],
                      [4, 4],
                      [4, 4],
                      [5, 5],
                      [5, 5],
                      [5, 5],
                      [5, 5],
                  ]
              ]
          ),
      ]
      expected = np.array([[16, 25]])
  
      actual = model.predict(x)
      assert expected == pytest.approx(actual)
  
      # Use the node model:
      xinp, xout = gs.in_out_tensors()
      model2 = keras.Model(inputs=xinp, outputs=xout)
      assert pytest.approx(expected) == model2.predict(x)
  
imports: from tensorflow import keras
  from tensorflow.keras import initializers, regularizers
  import tensorflow
  import numpy
  import pytest
  from stellargraph.mapper import GraphSAGENodeGenerator
  from stellargraph.layer.graphsage import GraphSAGE, MeanAggregator, MaxPoolingAggregator, MeanPoolingAggregator, AttentionalAggregator
  from ..test_utils.graphs import example_graph
  from ..None import test_utils
label_desc: Use image node_id 24 for calling a global function with example usage: test_graphsage_apply_1() without return types