code: def pack_and_forward(rnn, sequences, recurrent_state):
      """Pack sequences, multi-step forward, and then unwrap `PackedSequence`.
  
      Args:
          rnn (torch.nn.Module): Recurrent module.
          sequences (object): Sequences of input data.
          recurrent_state (object): Batched recurrent state.
  
      Returns:
          object: Sequence of output data, packed with time axis first.
          object: New batched recurrent state.
      """
      pack = pack_sequences_recursive(sequences)
      y, recurrent_state = rnn(pack, recurrent_state)
      return unwrap_packed_sequences_recursive(y), recurrent_state
  
file_path: pfrl/pfrl/utils/recurrent.py
imports: import itertools
  import numpy
  import torch
  from torch import nn
label_desc: Use image node_id 8 for calling a global function with example usage: pack_and_forward(rnn, sequences, recurrent_state) and returns: unwrap_packed_sequences_recursive,  recurrent_state