class_docstr: Aggregation layer for message passing withing GNN.
  
  :param aggregate: The aggregation function to use (max, mean, sum).
  :param pooling_mask: Multiplicative pooling mask for efficient aggregation computation.
code: def __init__(self, aggregate: str, pooling_mask: torch.Tensor):
      super(AggregationLayer, self).__init__()
  
      self.aggregate_str = aggregate
      self.aggregate = self._aggregation_fun(self.aggregate_str)
      self.pooling_mask = pooling_mask
  
      self.edges = self._edges_from_pooling_mask(
          torch.transpose(self.pooling_mask, 1, 2)
      )
  
imports: from typing import Any, List, Tuple, Union, Sequence, Dict
  import numpy
  import torch
  from torch import nn
  from torch_scatter import scatter
  from maze.core.annotations import override
  from maze.core.utils.factory import Factory
  from maze.perception.blocks.shape_normalization import ShapeNormalizationBlock
label_desc: Use image node_id 1 to create a new AggregationLayer object from inherited base classes: nn with example: obj = AggregationLayer(aggregate, pooling_mask)