class_docstr: Sequence to sequence parent module.
code: def reorder_decoder_incremental_state(self, incremental_state, inds):
      if torch.is_tensor(incremental_state):
          # gru or vanilla rnn
          return torch.index_select(
              incremental_state, 0, inds
          ).contiguous()
      elif isinstance(incremental_state, tuple):
          return tuple(
              self.reorder_decoder_incremental_state(x, inds)
              for x in incremental_state
          )
  
imports: import math
  import torch
  import torch.nn
  from torch.nn.parameter import Parameter
  from torch.nn.utils.rnn import pad_packed_sequence, pack_padded_sequence
  import torch.nn.functional
  from parlai.utils.torch import neginf
  from parlai.core.torch_generator_agent import TorchGeneratorModel
label_desc: Use image node_id 3 for calling the Seq2seq obj's underlying member method code with example usage: obj.reorder_decoder_incremental_state(incremental_state, inds) and returns: torch, tuple