code: def validate_shape_for_framework(
      self,
      generator: "DummyInputGenerator",
      input_name: str,
      framework: str,
      target_shape: Tuple[int, ...],
  ):
      generated_shape = generator.generate(input_name).shape
      target_shape = self._FRAMEWORK_TO_SHAPE_CLS[framework](
          target_shape
      )
      if generated_shape != target_shape:
          raise ValueError(
              f"{input_name} shape is wrong for framework = {framework}. Expected {target_shape} but got "
              f"{generated_shape}"
          )
  
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 1 for calling the GenerateDummy obj's underlying member method code with example usage: obj.validate_shape_for_framework(generator, input_name, framework, target_shape) without return types