Any unsuccessful candidate for nomination or election to any public office may contest the election of the candidate to whom a certificate of nomination or a certificate of election has been issued.