class_docstr: Max Pooling Aggregator for GraphSAGE implemented with Keras base layer
  
  Implements the aggregator of Eq. (3) in Hamilton et al. (2017)
  
  Args:
      output_dim (int): Output dimension
      bias (bool): Optional bias
      act (Callable or str): name of the activation function to use (must be a
          Keras activation function), or alternatively, a TensorFlow operation.
class_docstr_tok: ["Max","Pooling","Aggregator","for","GraphSAGE","implemented","with","Keras","base","layer","Implements","the","aggregator","of","Eq",".","(","3",")","in","Hamilton","et","al",".","(","2017",")","Args",":","output_dim","(","int",")",":","Output","dimension","bias","(","bool",")",":","Optional","bias","act","(","Callable","or","str",")",":","name","of","the","activation","function","to","use","(","must","be","a","Keras","activation","function",")",",","or","alternatively",",","a","TensorFlow","operation","."]
docstr: Aggregates the group tensors by max-pooling of neighbours
  
  Args:
      x_group (tf.Tensor): : The input tensor representing the sampled neighbour nodes.
      group_idx (int, optional): Group index.
  
  Returns:
      :class:`tensorflow.Tensor`: A tensor aggregation of the input nodes features.
docstr_tok: ["Aggregates","the","group","tensors","by","max-pooling","of","neighbours","Args",":","x_group","(","tf.Tensor",")",":",":","The","input","tensor","representing","the","sampled","neighbour","nodes",".","group_idx","(","int",",","optional",")",":","Group","index",".","Returns",":",":","class",":","`","tensorflow.Tensor","`",":","A","tensor","aggregation","of","the","input","nodes","features","."]
code: def group_aggregate(self, x_group, group_idx=0):
      """
      Aggregates the group tensors by max-pooling of neighbours
  
      Args:
          x_group (tf.Tensor): : The input tensor representing the sampled neighbour nodes.
          group_idx (int, optional): Group index.
  
      Returns:
          :class:`tensorflow.Tensor`: A tensor aggregation of the input nodes features.
      """
      if group_idx == 0:
          # Do not aggregate features for head nodes
          x_agg = K.dot(x_group, self.w_group[0])
  
      else:
          w_g, w_pool, b_pool = self.w_group[group_idx]
  
          # Pass neighbour features through a dense layer with w_pool, b_pool
          xw_neigh = self.hidden_act(K.dot(x_group, w_pool) + b_pool)
  
          # Take max of this tensor over neighbour dimension
          x_agg = K.max(xw_neigh, axis=2)
  
          # Final output is a dense layer over the aggregated tensor
          x_agg = K.dot(x_agg, w_g)
      return x_agg
  
imports: import warnings
  import numpy
  from tensorflow.keras.layers import Layer
  from tensorflow.keras import Input
  from tensorflow.keras import backend
  from tensorflow.keras.layers import Lambda, Dropout, Reshape, LeakyReLU
  from tensorflow.keras.utils import Sequence
  from tensorflow.keras import activations, initializers, constraints, regularizers
  from typing import List, Tuple, Callable, AnyStr, Union
  from ..mapper import GraphSAGENodeGenerator, GraphSAGELinkGenerator, DirectedGraphSAGENodeGenerator, DirectedGraphSAGELinkGenerator, NodeSequence, LinkSequence
  from .misc import deprecated_model_function
  from ..connector.neo4j.mapper import Neo4jGraphSAGENodeGenerator, Neo4jDirectedGraphSAGENodeGenerator
label_desc: Use image node_id 3 for calling the MaxPoolingAggregator obj's underlying member method code with example usage: obj.group_aggregate(x_group, group_idx) and returns: x_agg