code: def _test_disjoint_mode(layer, **kwargs):
      X = np.random.normal(size=(batch_size * N, F))
      I = np.repeat(np.arange(batch_size), N).astype(int)
      if "target_shape" in kwargs:
          target_output_shape = kwargs.pop("target_shape")
      else:
          target_output_shape = (batch_size, kwargs.get("channels", F))
  
      X_in = Input(shape=(F,))
      I_in = Input(shape=(), dtype=I.dtype)
      layer_instance = layer(**kwargs)
      output = layer_instance([X_in, I_in])
      model = Model([X_in, I_in], output)
      output = model([X, I])
      assert output.shape == target_output_shape
      assert (
          output.shape[1:]
          == layer_instance.compute_output_shape([X.shape, I.shape])[1:]
      )
      _check_output_and_model_output_shapes(
          output.shape, model.output_shape
      )
  
file_path: spektral/tests/test_layers/pooling/test_global_pooling.py
imports: import numpy
  import tensorflow
  from tensorflow.keras import Input, Model
  from spektral.layers import GlobalAttentionPool, GlobalAttnSumPool, GlobalAvgPool, GlobalMaxPool, GlobalSumPool, SortPool
  from tests.test_layers.convolutional.core import _test_get_config
label_desc: Use image node_id 4 for calling a global function with example usage: _test_disjoint_mode(layer) without return types