Spartz to leave public office after 2024 election