code: def run_layer(config):
      for mode in config["modes"]:
          if mode == MODES["SINGLE"]:
              if config["dense"]:
                  _test_single_mode(config["layer"], **config["kwargs"])
              if config["sparse"]:
                  _test_single_mode(
                      config["layer"], sparse=True, **config["kwargs"]
                  )
          elif mode == MODES["BATCH"]:
              _test_batch_mode(config["layer"], **config["kwargs"])
          elif mode == MODES["DISJOINT"]:
              if config["dense"]:
                  _test_disjoint_mode(
                      config["layer"], **config["kwargs"]
                  )
              if config["sparse"]:
                  _test_disjoint_mode(
                      config["layer"], sparse=True, **config["kwargs"]
                  )
      _test_get_config(config["layer"], **config["kwargs"])
  
file_path: spektral/tests/test_layers/pooling/core.py
imports: import numpy
  import scipy.sparse
  import tensorflow
  from tensorflow.keras import Input, Model
  from spektral.utils.sparse import sp_matrix_to_sp_tensor
  from tests.test_layers.convolutional.core import _test_get_config
label_desc: Use image node_id 6 for calling a global function with example usage: run_layer(config) without return types