code: def validate_dtype_for_framework(
      self,
      generator: "DummyInputGenerator",
      input_name: str,
      framework: str,
      target_dtype: str,
  ):
      if "int" in target_dtype:
          generated_tenor = generator.generate(
              input_name=input_name,
              framework=framework,
              int_dtype=target_dtype,
          )
      else:
          generated_tenor = generator.generate(
              input_name=input_name,
              framework=framework,
              float_dtype=target_dtype,
          )
      dtype_funcs = {
          "np": DTYPE_MAPPER.np,
          "pt": DTYPE_MAPPER.pt,
          "tf": DTYPE_MAPPER.tf,
      }
      target_dtype = dtype_funcs[framework](target_dtype)
      if generated_tenor.dtype != target_dtype:
          raise ValueError(
              f"{input_name} dtype is wrong for framework = {framework}. Expected {target_dtype} but got "
              f"{generated_tenor.dtype}"
          )
  
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 2 for calling the GenerateDummy obj's underlying member method code with example usage: obj.validate_dtype_for_framework(generator, input_name, framework, target_dtype) without return types