code: def check_vision_text_dual_encoder_from_pretrained(
      self,
      text_config,
      input_ids,
      attention_mask,
      vision_config,
      pixel_values=None,
      **kwargs,
  ):
      vision_model, text_model = self.get_vision_text_model(
          vision_config, text_config
      )
      kwargs = {"vision_model": vision_model, "text_model": text_model}
      model = VisionTextDualEncoderModel.from_vision_text_pretrained(
          **kwargs
      )
      model.to(torch_device)
      model.eval()
  
      output = model(
          input_ids=input_ids,
          pixel_values=pixel_values,
          attention_mask=attention_mask,
      )
  
      self.assertEqual(
          output["text_embeds"].shape,
          (input_ids.shape[0], model.config.projection_dim),
      )
      self.assertEqual(
          output["image_embeds"].shape,
          (pixel_values.shape[0], model.config.projection_dim),
      )
  
imports: import collections
  import tempfile
  import unittest
  import numpy
  from transformers.testing_utils import is_pt_flax_cross_test, require_torch, require_vision, slow, torch_device
  from transformers.utils import is_flax_available, is_torch_available, is_vision_available
  from ...test_modeling_common import floats_tensor, ids_tensor, random_attention_mask
  from ..bert.test_modeling_bert import BertModelTester
  from ..clip.test_modeling_clip import CLIPVisionModelTester
  from ..deit.test_modeling_deit import DeiTModelTester
  from ..roberta.test_modeling_roberta import RobertaModelTester
  from ..vit.test_modeling_vit import ViTModelTester
label_desc: Use image node_id 6 for calling the VisionTextDualEncoderMixin obj's underlying member method code with example usage: obj.check_vision_text_dual_encoder_from_pretrained(text_config, input_ids, attention_mask, vision_config, pixel_values) without return types