def METHOD_NAME(service_name, ok, reason):
    if short and not ok:
        raise WorkerConfigError(f"{service_name} unavailable: {reason}")
    service = {"name": service_name, "ok": ok}
    if not ok:
        service["reason"] = reason
    services.append(service)