code: def create_and_check_lxmert_model(
      self,
      config,
      input_ids,
      visual_feats,
      bounding_boxes,
      token_type_ids,
      input_mask,
      obj_labels,
      masked_lm_labels,
      matched_label,
      ans,
      output_attentions,
  ):
      model = LxmertModel(config=config)
      model.to(torch_device)
      model.eval()
      result = model(
          input_ids,
          visual_feats,
          bounding_boxes,
          token_type_ids=token_type_ids,
          attention_mask=input_mask,
          output_attentions=output_attentions,
      )
      result = model(
          input_ids,
          visual_feats,
          bounding_boxes,
          token_type_ids=token_type_ids,
          attention_mask=input_mask,
          output_attentions=not output_attentions,
      )
      result = model(
          input_ids, visual_feats, bounding_boxes, return_dict=False
      )
      result = model(
          input_ids, visual_feats, bounding_boxes, return_dict=True
      )
  
      self.parent.assertEqual(
          result.language_output.shape,
          (self.batch_size, self.seq_length, self.hidden_size),
      )
      self.parent.assertEqual(
          result.vision_output.shape,
          (self.batch_size, self.num_visual_features, self.hidden_size),
      )
      self.parent.assertEqual(
          result.pooled_output.shape,
          (self.batch_size, self.hidden_size),
      )
  
imports: import copy
  import unittest
  import numpy
  from transformers import LxmertConfig, is_tf_available, is_torch_available
  from transformers.models.auto import get_values
  from transformers.testing_utils import require_torch, slow, torch_device
  from ...test_configuration_common import ConfigTester
  from ...test_modeling_common import ModelTesterMixin, ids_tensor
label_desc: Use image node_id 4 for calling the LxmertModelTester obj's underlying member method code with example usage: obj.create_and_check_lxmert_model(config, input_ids, visual_feats, bounding_boxes, token_type_ids, input_mask, obj_labels, masked_lm_labels, matched_label, ans, output_attentions) without return types