class_docstr: This class acts as a generator of autograd for varying seq lengths with
  different padding behaviors, such as right padding, and order of seq lengths,
  such as descending order.
  
  The logic is mostly inspired from torch/nn/_functions/rnn.py, so it may be
  merged in the future.
class_docstr_tok: ["This","class","acts","as","a","generator","of","autograd","for","varying","seq","lengths","with","different","padding","behaviors",",","such","as","right","padding",",","and","order","of","seq","lengths",",","such","as","descending","order",".","The","logic","is","mostly","inspired","from","torch\/nn\/_functions\/rnn.py",",","so","it","may","be","merged","in","the","future","."]
code: def __init__(self, rnn_cell, reverse=False):
      super().__init__()
      self.rnn_cell = rnn_cell
      self.reverse = reverse
  
imports: import abc
  import math
  import torch
  import torch.nn
  import torch.nn.functional
  from fairseq import utils
  from fairseq.models import FairseqIncrementalDecoder, transformer
  from pytorch_translate import rnn_cell, utils, vocab_reduction
  from pytorch_translate.research.lexical_choice import lexical_translation
label_desc: Use image node_id 1 to create a new VariableLengthRecurrent object from inherited base classes: nn with example: obj = VariableLengthRecurrent(rnn_cell, reverse)