code: def check_tf_to_pt_equivalence(
      self, config, decoder_config, tf_inputs_dict
  ):
      encoder_decoder_config = (
          VisionEncoderDecoderConfig.from_encoder_decoder_configs(
              config, decoder_config
          )
      )
      # Output all for aggressive testing
      encoder_decoder_config.output_hidden_states = True
      # TODO: A generalizable way to determine this attribute
      encoder_decoder_config.output_attentions = True
  
      tf_model = TFVisionEncoderDecoderModel(encoder_decoder_config)
      # Make sure model is built before saving
      tf_model(**tf_inputs_dict)
  
      with tempfile.TemporaryDirectory() as tmpdirname:
          tf_model.save_pretrained(tmpdirname)
          pt_model = VisionEncoderDecoderModel.from_pretrained(
              tmpdirname, from_tf=True
          )
  
      self.check_pt_tf_equivalence(tf_model, pt_model, tf_inputs_dict)
  
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 16 for calling the TFVisionEncoderDecoderMixin obj's underlying member method code with example usage: obj.check_tf_to_pt_equivalence(config, decoder_config, tf_inputs_dict) without return types