class_docstr: Implements a single Transformer decoder layer with cross (encoder) attention as in.
  
  [Vaswani, 2017](https://arxiv.org/abs/1706.03762).
  
  Decoder layers are similar to encoder layers but:
  
  1. Self-attention is limited in a causal (auto-regressive) manner.
  2. Attend over all of the encoder states.
docstr: Reorder all incremental-state tensors for this layer.
docstr_tok: ["Reorder","all","incremental-state","tensors","for","this","layer","."]
code: def reorder_incremental_state(
      self, incremental_state: DecoderLayerIncrState, inds: torch.Tensor
  ) -> DecoderLayerIncrState:
      """
      Reorder all incremental-state tensors for this layer.
      """
      attn_types = {
          "self_attn": self.self_attention,
          "encoder_attn": self.encoder_attention,
      }
      return {
          attn_type: attn.reorder_incremental_state(
              incremental_state[attn_type], inds
          )
          for attn_type, attn in attn_types.items()
      }
  
imports: from __future__ import annotations
  from abc import ABC
  from typing import Dict, Optional, Tuple
  import numpy
  import torch
  import torch.nn
  from parlai.agents.transformer.modules import create_position_codes, get_n_positions_from_options, LAYER_NORM_EPS, MultiHeadAttention, TransformerFFN
  from parlai.agents.transformer.modules.modular import swappable
  from parlai.core.opt import Opt
  from parlai.core.params import default
  from parlai.core.torch_agent import DictionaryAgent
  from parlai.utils.misc import warn_once
  from parlai.utils.torch import PipelineHelper
  from parlai.utils.fsdp import fsdp_wrap
  from parlai.nn.checkpoint import checkpoint_wrapper
label_desc: Use image node_id 5 for calling the TransformerDecoderLayer obj's underlying member method code with example usage: obj.reorder_incremental_state(incremental_state, inds) and returns: unknown