class_docstr: Bidirection version GraphSAGE layer from paper `Inductive Representation Learning on
  Large Graphs <https://arxiv.org/pdf/1706.02216.pdf>`__.
  
  .. math::
      h_{\mathcal{N}(i)}^{(l+1)} & = \mathrm{aggregate}
      \left(\{h_{j}^{l}, \forall j \in \mathcal{N}(i) \}\right)
      h_{i}^{(l+1)} & = \sigma \left(W \cdot \mathrm{concat}
      (h_{i}^{l}, h_{\mathcal{N}(i)}^{l+1} + b) \right)
      h_{i}^{(l+1)} & = \mathrm{norm}(h_{i}^{l})
  
  Parameters
  ----------
  input_size : int, or pair of ints
      Input feature size.
      If the layer is to be applied on a unidirectional bipartite graph, ``in_feats``
      specifies the input feature size on both the source and destination nodes.  If
      a scalar is given, the source and destination node feature size would take the
      same value.
      If aggregator type is ``gcn``, the feature size of source and destination nodes
      are required to be the same.
  output_size : int
      Output feature size.
  feat_drop : float
      Dropout rate on features, default: ``0``.
  aggregator_type : str
      Aggregator type to use (``mean``, ``gcn``, ``pool``, ``lstm``).
  bias : bool
      If True, adds a learnable bias to the output. Default: ``True``.
  norm : callable activation function/layer or None, optional
      If not None, applies normalization to the updated node features.
  activation : callable activation function/layer or None, optional
      If not None, applies an activation function to the updated node features.
      Default: ``None``.
class_docstr_tok: ["Bidirection","version","GraphSAGE","layer","from","paper","`","Inductive","Representation","Learning","on","Large","Graphs","<","https",":","\/\/arxiv.org\/pdf\/1706.02216.pdf",">","`","__",".","..","math",":",":","h_","{","\\mathcal","{","N","}","(","i",")","}","^","{","(","l+1",")","}","&","=","\\mathrm","{","aggregate","}","\\left","(","\\","{","h_","{","j","}","^","{","l","}",",","\\forall","j","\\in","\\mathcal","{","N","}","(","i",")","\\","}","\\right",")","h_","{","i","}","^","{","(","l+1",")","}","&","=","\\sigma","\\left","(","W","\\cdot","\\mathrm","{","concat","}","(","h_","{","i","}","^","{","l","}",",","h_","{","\\mathcal","{","N","}","(","i",")","}","^","{","l+1","}","+","b",")","\\right",")","h_","{","i","}","^","{","(","l+1",")","}","&","=","\\mathrm","{","norm","}","(","h_","{","i","}","^","{","l","}",")","Parameters","--","--","--","--","--","input_size",":","int",",","or","pair","of","ints","Input","feature","size",".","If","the","layer","is","to","be","applied","on","a","unidirectional","bipartite","graph",",","``","in_feats","``","specifies","the","input","feature","size","on","both","the","source","and","destination","nodes",".","If","a","scalar","is","given",",","the","source","and","destination","node","feature","size","would","take","the","same","value",".","If","aggregator","type","is","``","gcn","``",",","the","feature","size","of","source","and","destination","nodes","are","required","to","be","the","same",".","output_size",":","int","Output","feature","size",".","feat_drop",":","float","Dropout","rate","on","features",",","default",":","``","0","``",".","aggregator_type",":","str","Aggregator","type","to","use","(","``","mean","``",",","``","gcn","``",",","``","pool","``",",","``","lstm","``",")",".","bias",":","bool","If","True",",","adds","a","learnable","bias","to","the","output",".","Default",":","``","True","``",".","norm",":","callable","activation","function\/layer","or","None",",","optional","If","not","None",",","applies","normalization","to","the","updated","node","features",".","activation",":","callable","activation","function\/layer","or","None",",","optional","If","not","None",",","applies","an","activation","function","to","the","updated","node","features",".","Default",":","``","None","``","."]
docstr: LSTM reducer
  NOTE(zihao): lstm reducer with default schedule (degree bucketing)
  is slow, we could accelerate this with degree padding in the future.
docstr_tok: ["LSTM","reducer","NOTE","(","zihao",")",":","lstm","reducer","with","default","schedule","(","degree","bucketing",")","is","slow",",","we","could","accelerate","this","with","degree","padding","in","the","future","."]
code: def _lstm_reducer_fw(self, nodes):
      """LSTM reducer
      NOTE(zihao): lstm reducer with default schedule (degree bucketing)
      is slow, we could accelerate this with degree padding in the future.
      """
      m = nodes.mailbox["m"]  # (B, L, D)
      batch_size = m.shape[0]
      h = (
          m.new_zeros((1, batch_size, self._in_src_size)),
          m.new_zeros((1, batch_size, self._in_src_size)),
      )
      _, (rst, _) = self.lstm_fw(m, h)
      return {"neigh": rst.squeeze(0)}
  
imports: import warnings
  import dgl.function
  import torch
  import torch.nn
  import torch.nn.functional
  from dgl.utils import check_eq_shape, expand_as_pair
  from .base import GNNBase, GNNLayerBase
label_desc: Use image node_id 3 for calling the BiSepGraphSAGELayerConv obj's underlying member method code with example usage: obj._lstm_reducer_fw(nodes) and returns: dict