Implement a function named round_to_nearest_five. This function should take a list of numbers, round each number to the nearest multiple of five using the Decimal class from the decimal module, and return a new list containing the rounded values.
Input/Output Requirements
Input: The function will accept a single argument:
numbers: A list of numeric values (integers and/or floats).
Output: The function will return a list of rounded values where each value is rounded to the nearest multiple of five. The returned values should be of type Decimal.
Implementation Details
Use the Decimal type for precise arithmetic operations and to avoid floating-point inaccuracies.
Apply rounding using ROUND_HALF_UP to ensure that values exactly halfway between multiples of five round up to the next five.
The final list should preserve the order of the original list.
File Structure
Create a file named /app/solution.py and implement the function as described above.
Example
For the input [2, 7, 11, 14.5], the output should be [0, 5, 10, 15].