def METHOD_NAME(make_stubber, error_code):
    lookoutvision_client = boto3.client('lookoutvision')
    lookoutvision_stubber = make_stubber(lookoutvision_client)
    project_name = 'test-project_name'
    model_version = 'test-model'
    lookoutvision_stubber.stub_delete_model(project_name, model_version)
    lookoutvision_stubber.stub_list_models(project_name, [], error_code=error_code)
    if error_code is None:
        Models.delete_model(lookoutvision_client, project_name, model_version)
    else:
        with pytest.raises(ClientError) as exc_info:
            Models.delete_model(lookoutvision_client, project_name, model_version)
        assert exc_info.value.response['Error']['Code'] == error_code