src/transformers/models/vision_encoder_decoder/modeling_vision_encoder_decoder.py/VisionEncoderDecoderModel/_reorder_cache
class VisionEncoderDecoderModel:    def _reorder_cache(self, past_key_values, beam_idx):
        # apply decoder cache reordering here
        return self.decoder._reorder_cache(past_key_values, beam_idx)