def rollback_marqo(req_dict: dict, marqo_config: config.Config = Depends(get_config)):
    """An internal API used for testing processes. Not to be used by users."""

    # TODO this a temporary fix due to the mixed use of pydantic v1 and v2.
    #  IndexSettingsWithName can be injected after migrated to v2
    req = parse_request_object(RollbackRequest, req_dict)

    rollback_runner = RollbackRunner(marqo_config.vespa_client, marqo_config.index_management)
    rollback_runner.rollback(from_version=req.from_version, to_version=req.to_version)
An internal API used for testing processes. Not to be used by users.
src/marqo/tensor_search/api.py