'Calculate the election status of a block.'

@classmethod
def block_election(cls, block, votes, keyring):

    eligible_voters = (set(block['block']['voters']) & set(keyring))
    n_voters = len(eligible_voters)
    (eligible_votes, ineligible_votes) = cls.partition_eligible_votes(votes, eligible_voters)
    by_voter = cls.dedupe_by_voter(eligible_votes)
    results = cls.count_votes(by_voter)
    results['block_id'] = block['id']
    results['status'] = cls.decide_votes(n_voters, **results['counts'])
    results['ineligible'] = ineligible_votes
    return results
