code: def test_model_outputs_equivalence(self):
      try:
          orig = self.all_model_classes
          # IdeficsModel.forward doesn't have labels input arg - only IdeficsForVisionText2Text does
          self.all_model_classes = (
              (IdeficsForVisionText2Text,)
              if is_torch_available()
              else ()
          )
          super().test_model_outputs_equivalence()
      finally:
          self.all_model_classes = orig
  
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 2 for calling the IdeficsModelTest obj's underlying member method code with example usage: obj.test_model_outputs_equivalence() without return types