class_docstr: The Learnable Commutative Monoid aggregation from the
  `"Learnable Commutative Monoids for Graph Neural Networks"
  <https://arxiv.org/abs/2212.08541>`_ paper, in which the elements are
  aggregated using a binary tree reduction with
  :math:`\mathcal{O}(\log |\mathcal{V}|)` depth.
  
  .. note::
  
      :class:`LCMAggregation` requires sorted indices :obj:`index` as input.
      Specifically, if you use this aggregation as part of
      :class:`~torch_geometric.nn.conv.MessagePassing`, ensure that
      :obj:`edge_index` is sorted by destination nodes, either by manually
      sorting edge indices via :meth:`~torch_geometric.utils.sort_edge_index`
      or by calling :meth:`torch_geometric.data.Data.sort`.
  
  .. warning::
  
      :class:`LCMAggregation` is not a permutation-invariant operator.
  
  Args:
      in_channels (int): Size of each input sample.
      out_channels (int): Size of each output sample.
      project (bool, optional): If set to :obj:`True`, the layer will apply a
          linear transformation followed by an activation function before
          aggregation. (default: :obj:`True`)
class_docstr_tok: ["The","Learnable","Commutative","Monoid","aggregation","from","the","`","``","Learnable","Commutative","Monoids","for","Graph","Neural","Networks","''","<","https",":","\/\/arxiv.org\/abs\/2212.08541",">","`","_","paper",",","in","which","the","elements","are","aggregated","using","a","binary","tree","reduction","with",":","math",":","`","\\mathcal","{","O","}","(","\\log","|\\mathcal","{","V","}","|",")","`","depth",".","..","note",":",":",":","class",":","`","LCMAggregation","`","requires","sorted","indices",":","obj",":","`","index","`","as","input",".","Specifically",",","if","you","use","this","aggregation","as","part","of",":","class",":","`","~torch_geometric.nn.conv.MessagePassing","`",",","ensure","that",":","obj",":","`","edge_index","`","is","sorted","by","destination","nodes",",","either","by","manually","sorting","edge","indices","via",":","meth",":","`","~torch_geometric.utils.sort_edge_index","`","or","by","calling",":","meth",":","`","torch_geometric.data.Data.sort","`",".","..","warning",":",":",":","class",":","`","LCMAggregation","`","is","not","a","permutation-invariant","operator",".","Args",":","in_channels","(","int",")",":","Size","of","each","input","sample",".","out_channels","(","int",")",":","Size","of","each","output","sample",".","project","(","bool",",","optional",")",":","If","set","to",":","obj",":","`","True","`",",","the","layer","will","apply","a","linear","transformation","followed","by","an","activation","function","before","aggregation",".","(","default",":",":","obj",":","`","True","`",")"]
code: def __repr__(self) -> str:
      return (
          f"{self.__class__.__name__}({self.in_channels}, "
          f"{self.out_channels}, project={self.project})"
      )
  
file_path: pytorch_geometric/torch_geometric/nn/aggr/lcm.py
imports: from math import ceil, log2
  from typing import Optional
  import torch
  from torch import Tensor
  from torch.nn import GRUCell, Linear
  from torch_geometric.experimental import disable_dynamic_shapes
  from torch_geometric.nn.aggr import Aggregation
label_desc: Use image node_id 4 for calling the LCMAggregation obj's underlying member method code with example usage: obj.__repr__() and returns: self, str, self, str, self, str, self, str