class_docstr: The FiD Model is a simpler version of the RAG Model.
  
  We override the encoder and decoder methods to join encoder outputs, and decode
  normally, respectively.
docstr: Override RagModel.reorder_decoder_incremental_state to resort back to normal
  reordering.
  
  See ``TorchGeneratorModel.reorder_decoder_incremental_state`` for a description.
docstr_tok: ["Override","RagModel.reorder_decoder_incremental_state","to","resort","back","to","normal","reordering",".","See","``","TorchGeneratorModel.reorder_decoder_incremental_state","``","for","a","description","."]
code: def reorder_decoder_incremental_state(
      self, incremental_state: Dict[int, dict], inds: torch.Tensor
  ) -> Dict[int, dict]:
      """
      Override RagModel.reorder_decoder_incremental_state to resort back to normal
      reordering.
  
      See ``TorchGeneratorModel.reorder_decoder_incremental_state`` for a description.
      """
      incremental_state = fix_incremental_state(
          self.generation_model, incremental_state
      )
      if not incremental_state:
          return incremental_state
      return {
          idx: layer.reorder_incremental_state(
              incremental_state[idx], inds
          )
          for idx, layer in enumerate(self.seq2seq_decoder.layers)
      }
  
imports: from abc import abstractmethod
  from copy import deepcopy
  import torch
  import random
  from typing import Tuple, Union, Optional, List, Dict, Any
  from parlai.core.dict import DictionaryAgent
  from parlai.core.opt import Opt
  from parlai.core.message import Message
  from parlai.agents.transformer.transformer import TransformerGeneratorModel
  from parlai.agents.rag.args import RetrieverType
  from parlai.agents.rag.modules import RagModel, Document, T5RagModel
  from parlai.agents.rag.rag import RagAgent
  from parlai.agents.rag.model_types import RagToken, get_forced_decoder_inputs, fix_incremental_state
  from parlai.utils.typing import TShared
  import parlai.utils.logging
  from parlai.tasks.wizard_of_internet import constants
label_desc: Use image node_id 3 for calling the FidModel obj's underlying member method code with example usage: obj.reorder_decoder_incremental_state(incremental_state, inds) and returns: unknown, incremental_state