def merge_inference_settings(
        self, inference_settings: Optional[dict[str, Any]] = None, execution_providers: list[str] = None
    ):
        """Merge user provided inference settings with model's inference settings.

        user provided inference_settings > model's inference_settings > eps given by arguments
        """
        inference_settings_merged = {"execution_provider": None, "provider_options": None}
        if self.inference_settings:
            # start with model's inference settings
            inference_settings_merged.update(self.inference_settings)
        if inference_settings:
            # update with user provided inference settings
            inference_settings_merged.update(inference_settings)

        if inference_settings_merged.get("execution_provider") is None:
            # use execution providers
            inference_settings_merged["execution_provider"] = execution_providers
            inference_settings_merged["provider_options"] = None

        # execution_provider should be a list
        if isinstance(inference_settings_merged["execution_provider"], (str, tuple)):
            inference_settings_merged["execution_provider"] = [inference_settings_merged["execution_provider"]]
        return inference_settings_merged
Merge user provided inference settings with model's inference settings.

        user provided inference_settings > model's inference_settings > eps given by arguments
        
olive/model/handler/onnx.py