class_docstr: The GraphSAGE operator from the `"Inductive Representation Learning on
  Large Graphs" <https://arxiv.org/abs/1706.02216>`_ paper
  
  .. math::
      \mathbf{\hat{x}}_i &= \mathbf{\Theta} \cdot
      \mathrm{mean}_{j \in \mathcal{N(i) \cup \{ i \}}}(\mathbf{x}_j)
  
      \mathbf{x}^{\prime}_i &= \frac{\mathbf{\hat{x}}_i}
      {\| \mathbf{\hat{x}}_i \|_2}.
  
  Args:
      in_channels (int): Size of each input sample.
      out_channels (int): Size of each output sample.
      normalize (bool, optional): If set to :obj:`True`, output features
          will be :math:`\ell_2`-normalized. (default: :obj:`False`)
      concat (bool, optional): If set to :obj:`True`, will concatenate
          current node features with aggregated ones. (default: :obj:`False`)
      bias (bool, optional): If set to :obj:`False`, the layer will not learn
          an additive bias. (default: :obj:`True`)
      **kwargs (optional): Additional arguments of
          :class:`torch_geometric.nn.conv.MessagePassing`.
class_docstr_tok: ["The","GraphSAGE","operator","from","the","`","``","Inductive","Representation","Learning","on","Large","Graphs","''","<","https",":","\/\/arxiv.org\/abs\/1706.02216",">","`","_","paper","..","math",":",":","\\mathbf","{","\\hat","{","x","}","}","_i","&","=","\\mathbf","{","\\Theta","}","\\cdot","\\mathrm","{","mean","}","_","{","j","\\in","\\mathcal","{","N","(","i",")","\\cup","\\","{","i","\\","}","}","}","(","\\mathbf","{","x","}","_j",")","\\mathbf","{","x","}","^","{","\\prime","}","_i","&","=","\\frac","{","\\mathbf","{","\\hat","{","x","}","}","_i","}","{","\\|","\\mathbf","{","\\hat","{","x","}","}","_i","\\|_2","}",".","Args",":","in_channels","(","int",")",":","Size","of","each","input","sample",".","out_channels","(","int",")",":","Size","of","each","output","sample",".","normalize","(","bool",",","optional",")",":","If","set","to",":","obj",":","`","True","`",",","output","features","will","be",":","math",":","`","\\ell_2","`","-normalized",".","(","default",":",":","obj",":","`","False","`",")","concat","(","bool",",","optional",")",":","If","set","to",":","obj",":","`","True","`",",","will","concatenate","current","node","features","with","aggregated","ones",".","(","default",":",":","obj",":","`","False","`",")","bias","(","bool",",","optional",")",":","If","set","to",":","obj",":","`","False","`",",","the","layer","will","not","learn","an","additive","bias",".","(","default",":",":","obj",":","`","True","`",")","*","*","kwargs","(","optional",")",":","Additional","arguments","of",":","class",":","`","torch_geometric.nn.conv.MessagePassing","`","."]
docstr: Args:
      res_n_id (Tensor, optional): Residual node indices coming from
          :obj:`DataFlow` generated by :obj:`NeighborSampler` are used to
          select central node features in :obj:`x`.
          Required if operating in a bipartite graph and :obj:`concat` is
          :obj:`True`. (default: :obj:`None`)
docstr_tok: ["Args",":","res_n_id","(","Tensor",",","optional",")",":","Residual","node","indices","coming","from",":","obj",":","`","DataFlow","`","generated","by",":","obj",":","`","NeighborSampler","`","are","used","to","select","central","node","features","in",":","obj",":","`","x","`",".","Required","if","operating","in","a","bipartite","graph","and",":","obj",":","`","concat","`","is",":","obj",":","`","True","`",".","(","default",":",":","obj",":","`","None","`",")"]
code: def forward(
      self, x, edge_index, edge_weight=None, size=None, res_n_id=None
  ):
      """
      Args:
          res_n_id (Tensor, optional): Residual node indices coming from
              :obj:`DataFlow` generated by :obj:`NeighborSampler` are used to
              select central node features in :obj:`x`.
              Required if operating in a bipartite graph and :obj:`concat` is
              :obj:`True`. (default: :obj:`None`)
      """
      if not self.concat and torch.is_tensor(x):
          edge_index, edge_weight = add_remaining_self_loops(
              edge_index, edge_weight, 1, x.size(self.node_dim)
          )
  
      return self.propagate(
          edge_index,
          size=size,
          x=x,
          edge_weight=edge_weight,
          res_n_id=res_n_id,
      )
  
imports: import torch
  import torch.nn
  import torch.nn.functional
  from torch.nn import Parameter
  from torch_geometric.nn.conv import MessagePassing
  from torch_geometric.nn.inits import glorot, zeros
  from torch_geometric.utils import add_remaining_self_loops
  from graphgym.register import register_layer
label_desc: Use image node_id 3 for calling the SAGEConvLayer obj's underlying member method code with example usage: obj.forward(x, edge_index, edge_weight, size, res_n_id) and returns: self