parameters: (elements, ranks)
return_statement: return result
docstring: Returns all of 'elements' for which corresponding element in parallel
          list 'rank' is equal to the maximum value in 'rank'.
docstring_summary: Returns all of 'elements' for which corresponding element in parallel
          list 'rank' is equal to the maximum value in 'rank'.
docstring_tokens: Returns all of elements for which corresponding element in parallel list rank is equal to the maximum value in rank .
function: def select_highest_ranked (elements, ranks):
      """ Returns all of 'elements' for which corresponding element in parallel
          list 'rank' is equal to the maximum value in 'rank'.
      """
      assert is_iterable(elements)
      assert is_iterable(ranks)
      if not elements:
          return []
  
      max_rank = max_element (ranks)
  
      result = []
      while elements:
          if ranks [0] == max_rank:
              result.append (elements [0])
  
          elements = elements [1:]
          ranks = ranks [1:]
  
      return result
function_tokens: def select_highest_ranked ( elements , ranks ) : assert is_iterable ( elements ) assert is_iterable ( ranks ) if not elements : return [ ] max_rank = max_element ( ranks ) result = [ ] while elements : if ranks [ 0 ] == max_rank : result . append ( elements [ 0 ] ) elements = elements [ 1 : ] ranks = ranks [ 1 : ] return result