<jupyter_start><jupyter_text>Highest Rank Number in ArrayWrite a method `highestRank(arr)` (or `highest-rank` in clojure) which returns the number which is most frequent in the given input array (or `ISeq`). If there is a tie for most frequent number, return the largest number of which is most frequent.Example:```arr = [12, 10, 8, 12, 7, 6, 4, 10, 12];highestRank(arr) //=> returns 12arr = [12, 10, 8, 12, 7, 6, 4, 10, 12, 10];highestRank(arr) //=> returns 12arr = [12, 10, 8, 8, 3, 3, 3, 3, 2, 4, 10, 12, 10];highestRank(arr) //=> returns 3```<jupyter_code>def highest_rank(arr):
    # sort the set of values found in the array first by their frequency, then by their descending values
    # return the highest ranking value sorted by these conditions
    highestRank = max(set(arr), key= lambda x: (arr.count(x), x))
    
    return highestRank<jupyter_output><empty_output><jupyter_text>Test Example<jupyter_code>example = [12, 10, 8, 12, 7, 6, 4, 10, 12, 10]
highest_rank(example)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.13188976377952755, 'fraction_numerical': 0.06791338582677166, 'mean_word_length': 4.878612716763006, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '499116', 'license': 'Apache-2.0', 'n_tokens_mistral': 421, 'n_tokens_neox': 338, 'n_words': 132, 'path': 'Highest_Rank_Number_in_Array_(6).ipynb', 'repo_name': 'emenriquez/python-challenge-exercises', 'size': '1016'}