def METHOD_NAME(optimum_model: bool, expected):
    hf_settings = HuggingFaceSettings(
        task="question-answering", optimum_model=optimum_model
    )
    model_settings = ModelSettings(
        name="foo",
        implementation=HuggingFaceRuntime,
        parameters=ModelParameters(extra=hf_settings.dict()),
    )
    pipeline = load_pipeline_from_settings(hf_settings, model_settings)
    assert isinstance(pipeline.model, expected)