code: def _prepare_for_class(
      self, inputs_dict, model_class, return_labels=False
  ):
      inputs_dict = super()._prepare_for_class(
          inputs_dict, model_class, return_labels=return_labels
      )
      # XXX: IdeficsForVisionText2TextTest has no MODEL_FOR group yet, but it should be the same
      # as MODEL_FOR_CAUSAL_LM_MAPPING_NAMES, so for now manually changing to do the right thing
      # as super won't do it
      if return_labels:
          inputs_dict["labels"] = torch.zeros(
              (
                  self.model_tester.batch_size,
                  self.model_tester.seq_length,
              ),
              dtype=torch.long,
              device=torch_device,
          )
  
      return inputs_dict
  
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 1 for calling the IdeficsModelTest obj's underlying member method code with example usage: obj._prepare_for_class(inputs_dict, model_class, return_labels) and returns: inputs_dict