A diagnostic utility for an Infineon Technologies Americas AURIX microcontroller must exchange two temporary register values before continuing a test sequence. Write a function that swaps two integers and returns both values in their new order.
Implement swap_numbers(a, b), where a and b are integers. The function must return a two-element tuple (b, a), with the original second value first and the original first value second. The values may be positive, negative, or zero. Do not perform input/output inside the function.
Use a clear approach that works without depending on arithmetic overflow behavior. In Python, tuple unpacking is acceptable.
a and b are integers.-10^9 <= a, b <= 10^9.def swap_numbers(a, b):