class_docstr: [`VisionEncoderDecoderModel`] is a generic model class that will be instantiated as a transformer architecture with
  one of the base vision 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, beam_idx):
      # apply decoder cache reordering here
      return self.decoder._reorder_cache(past, beam_idx)
  
imports: import gc
  import os
  import tempfile
  from typing import Optional
  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_vision_encoder_decoder import VisionEncoderDecoderConfig
label_desc: Use image node_id 13 for calling the VisionEncoderDecoderModel obj's underlying member method code with example usage: obj._reorder_cache(past, beam_idx) and returns: self