code: def forward(self, input, lengths, hx=None):
      if not isinstance(input, PackedSequence):
          input = pack_padded_sequence(
              input, lengths, batch_first=self.batch_first
          )
  
      res = self.lstm(input, hx)
      if self.pad:
          res = (
              pad_packed_sequence(res[0], batch_first=self.batch_first)[
                  0
              ],
              res[1],
          )
      return res
  
file_path: stanza/stanza/models/common/packed_lstm.py
imports: import torch
  import torch.nn
  import torch.nn.functional
  from torch.nn.utils.rnn import pad_packed_sequence, pack_padded_sequence, pack_sequence, PackedSequence
label_desc: Use image node_id 2 for calling the PackedLSTM obj's underlying member method code with example usage: obj.forward(input, lengths, hx) and returns: res