(values)
| 40 | |
| 41 | def get_most_voted_values(values_list, mode): |
| 42 | def count_most_common(values): |
| 43 | count = Counter(values) |
| 44 | most_common = count.most_common() |
| 45 | max_votes = most_common[0][1] |
| 46 | most_common_candidates = [i[0] for i in most_common if i[1] == max_votes] |
| 47 | selected_candidate = random.choice(most_common_candidates) |
| 48 | return selected_candidate, dict(count) |
| 49 | |
| 50 | count_results = [] |
| 51 | vote_stats = [] |
no outgoing calls
no test coverage detected