code: def check_encoder_decoder_model_labels(
      self,
      config,
      pixel_values,
      encoder_hidden_states,
      decoder_config,
      decoder_input_ids,
      decoder_attention_mask,
      labels,
      **kwargs,
  ):
      encoder_model, decoder_model = self.get_encoder_decoder_model(
          config, decoder_config
      )
      enc_dec_model = TFVisionEncoderDecoderModel(
          encoder=encoder_model, decoder=decoder_model
      )
  
      outputs_encoder_decoder = enc_dec_model(
          pixel_values=pixel_values,
          decoder_input_ids=decoder_input_ids,
          decoder_attention_mask=decoder_attention_mask,
          labels=labels,
          kwargs=kwargs,
      )
  
      # Make sure `loss` exist
      self.assertIn("loss", outputs_encoder_decoder)
  
      batch_size, seq_len = decoder_input_ids.shape
      expected_shape = (batch_size, seq_len, decoder_config.vocab_size)
      self.assertEqual(
          outputs_encoder_decoder["logits"].shape, expected_shape
      )
      self.assertEqual(
          outputs_encoder_decoder["encoder_last_hidden_state"].shape[0],
          pixel_values.shape[0],
      )
      self.assertEqual(
          outputs_encoder_decoder["encoder_last_hidden_state"].shape[
              -1
          ],
          config.hidden_size,
      )
  
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 8 for calling the TFVisionEncoderDecoderMixin obj's underlying member method code with example usage: obj.check_encoder_decoder_model_labels(config, pixel_values, encoder_hidden_states, decoder_config, decoder_input_ids, decoder_attention_mask, labels) without return types