async def METHOD_NAME(
    model_repository_handlers: ModelRepositoryHandlers,
    repository_index_request: RepositoryIndexRequest,
    sum_model_settings: ModelSettings,
    ready: Optional[bool],
    expected: int,
):
    await model_repository_handlers.unload(sum_model_settings.name)
    repository_index_request.ready = ready
    repo_index = list(await model_repository_handlers.index(repository_index_request))
    assert len(repo_index) == expected