code: def check_dummy_inputs_are_allowed(
      model: Union[
          "PreTrainedModel", "TFPreTrainedModel", "ModelMixin"
      ],
      dummy_input_names: Iterable[str],
  ):
      """
      Checks that the dummy inputs from the ONNX config is a subset of the allowed inputs for `model`.
      Args:
          model (`Union[transformers.PreTrainedModel, transformers.TFPreTrainedModel`]):
              The model instance.
          model_inputs (`Iterable[str]`):
              The model input names.
      """
  
      forward = (
          model.forward
          if is_torch_available() and isinstance(model, nn.Module)
          else model.call
      )
      forward_parameters = signature(forward).parameters
      forward_inputs_set = set(forward_parameters.keys())
      dummy_input_names = set(dummy_input_names)
  
      # We are fine if config_inputs has more keys than model_inputs
      if not dummy_input_names.issubset(forward_inputs_set):
          raise ValueError(
              f"Config dummy inputs are not a subset of the model inputs: {dummy_input_names} vs {forward_inputs_set}"
          )
  
imports: import copy
  import gc
  import multiprocessing
  import os
  import traceback
  from inspect import signature
  from itertools import chain
  from pathlib import Path
  from typing import Any, Dict, Iterable, List, Optional, Tuple, Union
  import numpy
  import onnx
  from transformers.utils import is_tf_available, is_torch_available
  from ...onnx.utils import _get_onnx_external_data_tensors, check_model_uses_external_data
  from ...utils import TORCH_MINIMUM_VERSION, is_diffusers_available, is_torch_onnx_support_available, logging, require_numpy_strictly_lower
  from ..error_utils import AtolError, MinimumVersionError, OutputMatchError, ShapeError
  from .base import OnnxConfig
  from .model_configs import SpeechT5OnnxConfig
  from .utils import PickableInferenceSession, recursive_to_device
label_desc: Use image node_id 1 for calling a global function with example usage: check_dummy_inputs_are_allowed(model, dummy_input_names) without return types