class_docstr: Decoder layer only for inference.
code: def reorder_incremental_state(self, incremental_state, new_order):
      cache = self.get_self_attn_cache(incremental_state)
      if cache is not None:
          for k in cache.keys():
              if k == "encdec_kv":
                  cur_order = new_order // self.beam_size
                  cur_order = cur_order[:: self.beam_size]
                  idx = 1
              else:
                  cur_order = new_order
                  idx = 0
              value = cache[k]
              cache[k] = value.index_select(idx, cur_order)
          self.set_self_attn_cache(incremental_state, cache)
  
file_path: lightseq/lightseq/training/cli/fs_modules/ls_fs_transformer_decoder_layer.py
imports: from fairseq.incremental_decoding_utils import with_incremental_state
  from lightseq.training.ops.pytorch.transformer_decoder_layer import LSTransformerDecoderLayer
label_desc: Use image node_id 4 for calling the LSFSTransformerDecoderLayer obj's underlying member method code with example usage: obj.reorder_incremental_state(incremental_state, new_order) without return types