class_docstr: A general class for graph pooling layers based on the "Select, Reduce,
  Connect" framework presented in:
  
  > [Understanding Pooling in Graph Neural Networks.](https://arxiv.org/abs/2110.05292)<br>
  > Daniele Grattarola et al.
  
  This layer computes:
  $$
      \begin{align}
          & \mathcal{S} = \left\{\mathcal{S}_k\right\}_{k=1:K} = \textrm{Sel}(\mathcal{G}) \\
          & \mathcal{X}'=\left\{\textrm{Red}( \mathcal{G}, \mathcal{S}_k )\right\}_{k=1:K} \\
          & \mathcal{E}'=\left\{\textrm{Con}( \mathcal{G}, \mathcal{S}_k, \mathcal{S}_l )\right\}_{k,L=1:K} \\
      \end{align}
  $$
  Where \(\textrm{Sel}\) is a node equivariant selection function that computes
  the supernode assignments \(\mathcal{S}_k\), \(\textrm{Red}\) is a
  permutation-invariant function to reduce the supernodes into the new node
  attributes, and \(\textrm{Con}\) is a permutation-invariant connection
  function that computes the link between the pooled nodes.
  
  By extending this class, it is possible to create any pooling layer in the
  SRC formalism.
  
  **Input**
  
  - `x`: Tensor of shape `([batch], N, F)` representing node features;
  - `a`: Tensor or SparseTensor of shape `([batch], N, N)` representing the
  adjacency matrix;
  - `i`: (optional) Tensor of integers with shape `(N, )` representing the
  batch index;
  
  **Output**
  
  - `x_pool`: Tensor of shape `([batch], K, F)`, representing the node
  features of the output. `K` is the number of output nodes and depends on the
  specific pooling strategy;
  - `a_pool`: Tensor or SparseTensor of shape `([batch], K, K)` representing
  the adjacency matrix of the output;
  - `i_pool`: (only if i was given as input) Tensor of integers with shape
  `(K, )` representing the batch index of the output;
  - `s`: (if `return_selection=True`) Tensor or SparseTensor representing the
  supernode assignments;
  
  **API**
  
  - `pool(x, a, i, **kwargs)`: pools the graph and returns the reduced node
  features and adjacency matrix. If the batch index `i` is not `None`, a
  reduced version of `i` will be returned as well.
  Any given `kwargs` will be passed as keyword arguments to `select()`,
  `reduce()` and `connect()` if any matching key is found.
  The mandatory arguments of `pool()` **must** be computed in `call()` by
  calling `self.get_inputs(inputs)`.
  - `select(x, a, i, **kwargs)`: computes supernode assignments mapping the
  nodes of the input graph to the nodes of the output.
  - `reduce(x, s, **kwargs)`: reduces the supernodes to form the nodes of the
  pooled graph.
  - `connect(a, s, **kwargs)`: connects the reduced supernodes.
  - `reduce_index(i, s, **kwargs)`: helper function to reduce the batch index
  (only called if `i` is given as input).
  
  When overriding any function of the API, it is possible to access the
  true number of nodes of the input (`n_nodes`) as a Tensor in the instance variable
  `self.n_nodes` (this is populated by `self.get_inputs()` at the beginning of
  `call()`).
  
  **Arguments**:
  
  - `return_selection`: if `True`, the Tensor used to represent supernode assignments
  will be returned with `x_pool`, `a_pool`, and `i_pool`;
code: def _get_kwargs(x, a, i, signature, kwargs):
      output = {}
      for k in signature.keys():
          if (
              signature[k].default is inspect.Parameter.empty
              or k == "kwargs"
          ):
              pass
          elif k == "x":
              output[k] = x
          elif k == "a":
              output[k] = a
          elif k == "i":
              output[k] = i
          elif k in kwargs:
              output[k] = kwargs[k]
          else:
              raise ValueError(
                  "Missing key {} for signature {}".format(k, signature)
              )
  
      return output
  
imports: import inspect
  import tensorflow
  from tensorflow.keras import backend
  from tensorflow.keras.layers import Layer
  from spektral.utils.keras import deserialize_kwarg, is_keras_kwarg, is_layer_kwarg, serialize_kwarg
label_desc: Use image node_id 9 for calling the SRCPool obj's underlying member method code with example usage: obj._get_kwargs(x, a, i, signature, kwargs) and returns: output