class_docstr: The Stack LSTM from Dyer et al: https://arxiv.org/abs/1505.08075
class_docstr_tok: ["The","Stack","LSTM","from","Dyer","et","al",":","https",":","\/\/arxiv.org\/abs\/1505.08075"]
docstr: Shapes:
      state: (lstm_layers, 1, lstm_hidden_dim) each
      return value: (1, lstm_hidden_dim)
docstr_tok: ["Shapes",":","state",":","(","lstm_layers",",","1",",","lstm_hidden_dim",")","each","return","value",":","(","1",",","lstm_hidden_dim",")"]
code: def _lstm_output(
      self, state: Tuple[torch.Tensor, torch.Tensor]
  ) -> torch.Tensor:
      """
      Shapes:
          state: (lstm_layers, 1, lstm_hidden_dim) each
          return value: (1, lstm_hidden_dim)
      """
      return state[0][-1]
  
imports: from typing import Any, List, Sized, Tuple
  import torch
  import torch.nn
  from pytext.torchscript.utils import reverse_tensor_list
  from pytext.utils.cuda import FloatTensor
  from pytext.utils.tensor import xaviervar
label_desc: Use image node_id 2 for calling the StackLSTM obj's underlying member method code with example usage: obj._lstm_output(state) and returns: state