code: def check_save_load(
      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
      )
      model = VisionTextDualEncoderModel(
          vision_model=vision_model, text_model=text_model
      )
      model.to(torch_device)
      model.eval()
  
      with torch.no_grad():
          output = model(
              input_ids=input_ids,
              pixel_values=pixel_values,
              attention_mask=attention_mask,
          )
          out_1 = output[0].cpu().numpy()
  
          with tempfile.TemporaryDirectory() as tmpdirname:
              model.save_pretrained(tmpdirname)
              model = VisionTextDualEncoderModel.from_pretrained(
                  tmpdirname
              ).eval()
              model.to(torch_device)
  
              after_output = model(
                  input_ids=input_ids,
                  pixel_values=pixel_values,
                  attention_mask=attention_mask,
              )
              out_2 = after_output[0].cpu().numpy()
              max_diff = np.amax(np.abs(out_2 - out_1))
              self.assertLessEqual(max_diff, 1e-5)
  
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 7 for calling the VisionTextDualEncoderMixin obj's underlying member method code with example usage: obj.check_save_load(text_config, input_ids, attention_mask, vision_config, pixel_values) without return types