Keysight PathWave test automation may process numeric configuration values alongside calendar-based test metadata. Implement a function that reverses the digits of a signed integer and determines whether a given year is a leap year in the Gregorian calendar.
Given integers number and year, return a dictionary with exactly two entries:
reversed: number with its decimal digits reversed. Preserve the sign, and discard leading zeroes in the reversed result.is_leap_year: True if year is a leap year, otherwise False.A year is a leap year if it is divisible by 400, or if it is divisible by 4 but not by 100. Use arithmetic rather than converting number to a string for the primary solution.
def reverse_and_check_year(number, year):