code: def test_real_model_save_load_from_pretrained(self):
      model_2 = self.get_pretrained_model()
      pixel_values = floats_tensor(
          [
              13,
              model_2.config.encoder.num_channels,
              model_2.config.encoder.image_size,
              model_2.config.encoder.image_size,
          ]
      )
      decoder_input_ids = ids_tensor(
          [13, 1], model_2.config.decoder.vocab_size
      )
  
      outputs = model_2(
          pixel_values=pixel_values,
          decoder_input_ids=decoder_input_ids,
      )
      out_2 = np.array(outputs[0])
      out_2[np.isnan(out_2)] = 0
  
      with tempfile.TemporaryDirectory() as tmp_dirname:
          model_2.save_pretrained(tmp_dirname)
          model_1 = TFVisionEncoderDecoderModel.from_pretrained(
              tmp_dirname
          )
  
          after_outputs = model_1(
              pixel_values=pixel_values,
              decoder_input_ids=decoder_input_ids,
          )
          out_1 = np.array(after_outputs[0])
          out_1[np.isnan(out_1)] = 0
          max_diff = np.amax(np.abs(out_1 - out_2))
          self.assertLessEqual(max_diff, 1e-5)
  
imports: import copy
  import os
  import tempfile
  import unittest
  import numpy
  from transformers import is_tf_available, is_torch_available, is_vision_available
  from transformers.testing_utils import is_pt_tf_cross_test, require_tf, require_torch, require_vision, slow, torch_device
  from transformers.utils.generic import ModelOutput
  from ...test_modeling_tf_common import floats_tensor, ids_tensor
  from ..gpt2.test_modeling_tf_gpt2 import TFGPT2ModelTester
  from ..vit.test_modeling_tf_vit import TFViTModelTester
label_desc: Use image node_id 27 for calling the TFVisionEncoderDecoderMixin obj's underlying member method code with example usage: obj.test_real_model_save_load_from_pretrained() without return types