code: def test_vision_models(
      self,
      test_name: str,
      model_name: str,
      batch_size: int,
      num_channels: int,
      height: int,
      width: 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 = DummyVisionInputGenerator(
          task="image-classification",
          normalized_config=normalized_config,
          batch_size=batch_size,
          num_channels=num_channels,
          height=height,
          width=width,
      )
      with self.assertRaises(
          ValueError
      ) if num_channels != normalized_config.num_channels else nullcontext():
          self.validate_shape_for_all_frameworks(
              input_generator,
              "pixel_values",
              (batch_size, num_channels, height, width),
          )
          self.validate_shape_for_all_frameworks(
              input_generator, "pixel_mask", (batch_size, height, width)
          )
  
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 6 for calling the GenerateDummy obj's underlying member method code with example usage: obj.test_vision_models(test_name, model_name, batch_size, num_channels, height, width) without return types