I have code that iterates over many elements, checks their value, and returns the one with the highest value:
best_el =