class_docstr: Testing suite for Vision Models - tests all the tests defined in `BetterTransformersTestMixin`
code: def prepare_inputs_for_class(
      self, model_id, model_type, batch_size=3, **preprocessor_kwargs
  ):
      if model_type == "vilt":
          url = "http://images.cocodataset.org/val2017/000000039769.jpg"
          image = Image.open(requests.get(url, stream=True).raw)
          text = "How many cats are there?"
  
          # Model takes image and text as input
          processor = AutoProcessor.from_pretrained(model_id)
          inputs = processor(
              images=image, text=text, return_tensors="pt"
          )
      elif model_type in ["blip-2", "clip", "clip_text_model"]:
          url = "http://images.cocodataset.org/val2017/000000039769.jpg"
          image = Image.open(requests.get(url, stream=True).raw)
  
          if (
              batch_size == 1 or model_type == "blip-2"
          ):  # TODO setup preprocessor_kwargs with batch_size=1 for blip-2
              text = ["a photo"]
          else:
              text = ["a photo"] + ["a photo of two big cats"] * (
                  batch_size - 1
              )
  
          padding = preprocessor_kwargs.pop("padding", True)
          # Model takes image and text as input
          processor = AutoProcessor.from_pretrained(model_id)
          inputs = processor(
              images=image,
              text=text,
              padding=padding,
              return_tensors="pt",
              **preprocessor_kwargs,
          )
  
          if model_type == "blip-2":
              inputs["decoder_input_ids"] = inputs["input_ids"]
  
      else:
          url = "http://images.cocodataset.org/val2017/000000039769.jpg"
          image = Image.open(requests.get(url, stream=True).raw)
  
          # Use the same feature extractor for everyone
          feature_extractor = AutoFeatureExtractor.from_pretrained(
              "hf-internal-testing/tiny-random-ViTModel"
          )
          inputs = feature_extractor(images=image, return_tensors="pt")
      return inputs
  
file_path: optimum/tests/bettertransformer/test_vision.py
imports: import unittest
  import requests
  from parameterized import parameterized
  from PIL import Image
  from testing_utils import MODELS_DICT, BetterTransformersTestMixin
  from transformers import AutoFeatureExtractor, AutoProcessor
  from optimum.utils.testing_utils import grid_parameters
label_desc: Use image node_id 1 for calling the BetterTransformersVisionTest obj's underlying member method code with example usage: obj.prepare_inputs_for_class(model_id, model_type, batch_size) and returns: inputs