<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def gcd(a, b):
 """ Calculates the Greatest Common Divisor. :param a: the first number. :param b: the second number. :return: GCD(a, b) """

        while b:
            a, b = b, a % b

        return a