Implement a function calculate_min_eversions(arr) that calculates the minimum number of eversion steps required to arrange the elements of the given list arr in a non-decreasing order by performing eversion operations. An eversion operation consists of selecting any element from the list and moving it to the end of the list.
Functionality Requirements:
The function should iterate through the list in reverse order and count how many operations are needed to ensure that each selected element is greater than all previously selected elements.
Initialize a counter to track the number of eversion operations required.
Input Requirements:
The function takes one parameter:
arr (List[int]): A list of integers to be processed. The list can contain any integers (positive, negative, or zero).
Output Requirements:
The function should return an integer representing the minimum number of eversion steps required.
Constraints:
The input list arr can be empty, in which case the function should return 0.
Implementation:
The solution must be written in a file called /app/solution.py.