code: def test_text_models(
      self,
      test_name: str,
      model_name: str,
      batch_size: int,
      num_choices: int,
      sequence_length: int,
  ):
      # isn't this very verbose?
      config = AutoConfig.from_pretrained(model_name)
      normalized_config_class = (
          NormalizedConfigManager.get_normalized_config_class(
              config.model_type
          )
      )
      normalized_config = normalized_config_class(config)
  
      input_generator = DummyTextInputGenerator(
          task="text-classification",
          normalized_config=normalized_config,
          batch_size=batch_size,
          num_choices=num_choices,
          sequence_length=sequence_length,
      )
      self.validate_shape_for_all_frameworks(
          input_generator, "input_ids", (batch_size, sequence_length)
      )
      self.validate_shape_for_all_frameworks(
          input_generator,
          "attention_mask",
          (batch_size, sequence_length),
      )
  
      input_generator = DummyTextInputGenerator(
          task="multiple-choice",
          normalized_config=normalized_config,
          batch_size=batch_size,
          num_choices=num_choices,
          sequence_length=sequence_length,
      )
      self.validate_shape_for_all_frameworks(
          input_generator,
          "input_ids",
          (batch_size, num_choices, sequence_length),
      )
      self.validate_shape_for_all_frameworks(
          input_generator,
          "attention_mask",
          (batch_size, num_choices, sequence_length),
      )
  
file_path: optimum/tests/utils/test_dummpy_input_generators.py
imports: from contextlib import nullcontext
  from typing import TYPE_CHECKING, Tuple
  from unittest import TestCase
  import torch
  from parameterized import parameterized
  from transformers import AutoConfig
  from transformers.utils import is_tf_available
  from optimum.utils import DTYPE_MAPPER, DummyAudioInputGenerator, DummyTextInputGenerator, DummyVisionInputGenerator
  from optimum.utils.normalized_config import NormalizedConfigManager
  from optimum.utils.testing_utils import grid_parameters
label_desc: Use image node_id 5 for calling the GenerateDummy obj's underlying member method code with example usage: obj.test_text_models(test_name, model_name, batch_size, num_choices, sequence_length) without return types