class_docstr: [`EncoderDecoderModel`] is a generic model class that will be instantiated as a transformer architecture with one
  of the base model classes of the library as encoder and another one as decoder when created with the
  :meth*~transformers.AutoModel.from_pretrained* class method for the encoder and
  :meth*~transformers.AutoModelForCausalLM.from_pretrained* class method for the decoder.
class_docstr_tok: ["[","`","EncoderDecoderModel","`","]","is","a","generic","model","class","that","will","be","instantiated","as","a","transformer","architecture","with","one","of","the","base","model","classes","of","the","library","as","encoder","and","another","one","as","decoder","when","created","with","the",":","meth","*","~transformers.AutoModel.from_pretrained","*","class","method","for","the","encoder","and",":","meth","*","~transformers.AutoModelForCausalLM.from_pretrained","*","class","method","for","the","decoder","."]
code: def _reorder_cache(self, past_key_values, beam_idx):
      # apply decoder cache reordering here
      return self.decoder._reorder_cache(past_key_values, beam_idx)
  
imports: import gc
  import inspect
  import os
  import tempfile
  import warnings
  from typing import Optional, Tuple, Union
  import torch
  from torch import nn
  from torch.nn import CrossEntropyLoss
  from ...configuration_utils import PretrainedConfig
  from ...modeling_outputs import BaseModelOutput, Seq2SeqLMOutput
  from ...modeling_utils import PreTrainedModel
  from ...utils import add_start_docstrings, add_start_docstrings_to_model_forward, logging, replace_return_docstrings
  from ..auto.configuration_auto import AutoConfig
  from ..auto.modeling_auto import AutoModel, AutoModelForCausalLM
  from .configuration_encoder_decoder import EncoderDecoderConfig
label_desc: Use image node_id 14 for calling the EncoderDecoderModel obj's underlying member method code with example usage: obj._reorder_cache(past_key_values, beam_idx) and returns: self