code: def create_and_check_model_gen(
      self,
      config,
      input_ids,
      input_mask,
      pixel_values,
      image_attention_mask,
      interpolate_pos_encoding,
  ):
      model = IdeficsForVisionText2Text(config)
      model.to(torch_device)
      model.eval()
      model.generate(
          input_ids,
          attention_mask=input_mask,
          pixel_values=pixel_values,
          image_attention_mask=image_attention_mask,
          interpolate_pos_encoding=interpolate_pos_encoding,
          max_length=self.seq_length + 2,
      )
  
imports: import unittest
  from parameterized import parameterized
  from transformers import BitsAndBytesConfig, IdeficsConfig, is_torch_available, is_vision_available
  from transformers.testing_utils import TestCasePlus, require_bitsandbytes, require_torch, require_torch_sdpa, require_vision, slow, torch_device
  from transformers.utils import cached_property
  from ...test_configuration_common import ConfigTester
  from ...test_modeling_common import ModelTesterMixin, floats_tensor, ids_tensor, random_attention_mask
  from ...test_pipeline_mixin import PipelineTesterMixin
label_desc: Use image node_id 6 for calling the IdeficsModelTester obj's underlying member method code with example usage: obj.create_and_check_model_gen(config, input_ids, input_mask, pixel_values, image_attention_mask, interpolate_pos_encoding) without return types