class_docstr: Wrapper for a TransformerGeneratorModel to unflatten/flatten the incremental state.
  
  Unflattening/flattening will occur before passing the incremental state into and out
  of .reorder_decoder_incremental_state(). We also support .output(), which is also
  traced.
code: def reorder_decoder_incremental_state(
      self, flat_incr_state: Dict[str, torch.Tensor], inds: torch.Tensor
  ) -> Dict[str, torch.Tensor]:
      structured_incr_state = self._unflatten_incr_state(
          flat_incr_state
      )
      new_structured_incr_state = (
          self.module.reorder_decoder_incremental_state(
              incremental_state=structured_incr_state, inds=inds
          )
      )
      return self._flatten_incr_state(new_structured_incr_state)
  
imports: from collections import defaultdict
  from typing import Dict, List, Optional, Tuple
  import torch.jit
  from parlai.agents.bart.bart import BartAgent
  from parlai.core.dict import DictionaryAgent
  from parlai.core.torch_agent import TorchAgent
  from parlai.utils.bpe import Gpt2BpeHelper, SubwordBPEHelper
  from parlai.torchscript.tokenizer import ScriptableDictionaryAgent
  from torch import nn
label_desc: Use image node_id 1 for calling the ModelIncrStateFlattener obj's underlying member method code with example usage: obj.reorder_decoder_incremental_state(flat_incr_state, inds) and returns: self