Any magnetic or electronic storage medium used for the ballot tabulation program and any magnetic or electronic storage medium containing election results shall be kept in a secure location and shall be retained for six months following any local election and 22 months following any federal election or so long thereafter as any contest involving the vote at the local or federal election remains undetermined.