code: def has_onnx_input(
      model: Union[onnx.ModelProto, Path, str], input_name: str
  ) -> bool:
      """
      Checks if the model has a specific input.
      """
      if isinstance(model, (str, Path)):
          model = Path(model).as_posix()
          model = onnx.load(model, load_external_data=False)
  
      for input in model.graph.input:
          if input.name == input_name:
              return True
      return False
  
file_path: optimum/optimum/onnx/utils.py
imports: from pathlib import Path
  from typing import List, Tuple, Union
  import onnx
  from onnx.external_data_helper import ExternalDataInfo, _get_initializer_tensors
label_desc: Use image node_id 4 for calling a global function with example usage: has_onnx_input(model, input_name) and returns: False, True