code: def get_candidates_by_party(self):
          
          candidate_elections = CandidateElection.objects.filter(election=self)
  
          return {
              ce.candidate.party.slug: ce.candidate for ce in candidate_elections
          }
docs: Get CandidateElections serialized into an object with
          party-slug keys.