class_docstr: Base class for creating message passing layers.
  
  Message passing layers follow the form
  
  .. math::
      \mathbf{x}_i^{\prime} = \gamma_{\mathbf{\Theta}} \left( \mathbf{x}_i,
      \bigoplus_{j \in \mathcal{N}(i)} \, \phi_{\mathbf{\Theta}}
      \left(\mathbf{x}_i, \mathbf{x}_j,\mathbf{e}_{j,i}\right) \right),
  
  where :math:`\bigoplus` denotes a differentiable, permutation invariant
  function, *e.g.*, sum, mean, min, max or mul, and
  :math:`\gamma_{\mathbf{\Theta}}` and :math:`\phi_{\mathbf{\Theta}}` denote
  differentiable functions such as MLPs.
  See `here <https://pytorch-geometric.readthedocs.io/en/latest/tutorial/
  create_gnn.html>`__ for the accompanying tutorial.
  
  Args:
      aggr (str or [str] or Aggregation, optional): The aggregation scheme
          to use, *e.g.*, :obj:`"sum"` :obj:`"mean"`, :obj:`"min"`,
          :obj:`"max"` or :obj:`"mul"`.
          In addition, can be any
          :class:`~torch_geometric.nn.aggr.Aggregation` module (or any string
          that automatically resolves to it).
          If given as a list, will make use of multiple aggregations in which
          different outputs will get concatenated in the last dimension.
          If set to :obj:`None`, the :class:`MessagePassing` instantiation is
          expected to implement its own aggregation logic via
          :meth:`aggregate`. (default: :obj:`"add"`)
      aggr_kwargs (Dict[str, Any], optional): Arguments passed to the
          respective aggregation function in case it gets automatically
          resolved. (default: :obj:`None`)
      flow (str, optional): The flow direction of message passing
          (:obj:`"source_to_target"` or :obj:`"target_to_source"`).
          (default: :obj:`"source_to_target"`)
      node_dim (int, optional): The axis along which to propagate.
          (default: :obj:`-2`)
      decomposed_layers (int, optional): The number of feature decomposition
          layers, as introduced in the `"Optimizing Memory Efficiency of
          Graph Neural Networks on Edge Computing Platforms"
          <https://arxiv.org/abs/2104.03058>`_ paper.
          Feature decomposition reduces the peak memory usage by slicing
          the feature dimensions into separated feature decomposition layers
          during GNN aggregation.
          This method can accelerate GNN execution on CPU-based platforms
          (*e.g.*, 2-3x speedup on the
          :class:`~torch_geometric.datasets.Reddit` dataset) for common GNN
          models such as :class:`~torch_geometric.nn.models.GCN`,
          :class:`~torch_geometric.nn.models.GraphSAGE`,
          :class:`~torch_geometric.nn.models.GIN`, etc.
          However, this method is not applicable to all GNN operators
          available, in particular for operators in which message computation
          can not easily be decomposed, *e.g.* in attention-based GNNs.
          The selection of the optimal value of :obj:`decomposed_layers`
          depends both on the specific graph dataset and available hardware
          resources.
          A value of :obj:`2` is suitable in most cases.
          Although the peak memory usage is directly associated with the
          granularity of feature decomposition, the same is not necessarily
          true for execution speedups. (default: :obj:`1`)
docstr: Aggregates messages from neighbors as
  :math:`\bigoplus_{j \in \mathcal{N}(i)}`.
  
  Takes in the output of message computation as first argument and any
  argument which was initially passed to :meth:`propagate`.
  
  By default, this function will delegate its call to the underlying
  :class:`~torch_geometric.nn.aggr.Aggregation` module to reduce messages
  as specified in :meth:`__init__` by the :obj:`aggr` argument.
docstr_tok: ["Aggregates","messages","from","neighbors","as",":","math",":","`","\\bigoplus_","{","j","\\in","\\mathcal","{","N","}","(","i",")","}","`",".","Takes","in","the","output","of","message","computation","as","first","argument","and","any","argument","which","was","initially","passed","to",":","meth",":","`","propagate","`",".","By","default",",","this","function","will","delegate","its","call","to","the","underlying",":","class",":","`","~torch_geometric.nn.aggr.Aggregation","`","module","to","reduce","messages","as","specified","in",":","meth",":","`","__init__","`","by","the",":","obj",":","`","aggr","`","argument","."]
code: def aggregate(
      self,
      inputs: Tensor,
      index: Tensor,
      ptr: Optional[Tensor] = None,
      dim_size: Optional[int] = None,
  ) -> Tensor:
      r"""Aggregates messages from neighbors as
      :math:`\bigoplus_{j \in \mathcal{N}(i)}`.
  
      Takes in the output of message computation as first argument and any
      argument which was initially passed to :meth:`propagate`.
  
      By default, this function will delegate its call to the underlying
      :class:`~torch_geometric.nn.aggr.Aggregation` module to reduce messages
      as specified in :meth:`__init__` by the :obj:`aggr` argument.
      """
      return self.aggr_module(
          inputs, index, ptr=ptr, dim_size=dim_size, dim=self.node_dim
      )
  
imports: import os.path
  import warnings
  from abc import abstractmethod
  from inspect import Parameter
  from typing import Any, Callable, Dict, List, Optional, OrderedDict, Set, Tuple, Union
  import torch
  from torch import Tensor
  from torch.utils.hooks import RemovableHandle
  from torch_geometric import is_compiling
  from torch_geometric.inspector import Inspector, Signature
  from torch_geometric.nn.aggr import Aggregation
  from torch_geometric.nn.resolver import aggregation_resolver
  from torch_geometric.template import module_from_template
  from torch_geometric.typing import Adj, Size, SparseTensor
  from torch_geometric.utils import is_sparse, is_torch_sparse_tensor, to_edge_index
  from torch_geometric.utils.sparse import ptr2index
label_desc: Use image node_id 13 for calling the MessagePassing obj's underlying member method code with example usage: obj.aggregate(inputs, index, ptr, dim_size) and returns: self