def _gcd2(a, b):
    """ Calculates the greatest common divisor (gcd) of a and b

    Deprecated, use math.gcd instead.
    Implements Euclide's algorithm.
    If a and b are both 0, returns 0

    :type a:    int >= 0
    :type b:    int >= 0

    :return:       gcd(a, b)
    :rtype:        int

    :Example:

    >>> _gcd2(0, 0)
    0
    >>> _gcd2(11, 0)
    11
    >>> _gcd2(0, 7)
    7
    >>> _gcd2(7**5 * 3**4, 7**2 * 3**6)
    3969
    """
    import warnings
    warnings.warn('_gcd2() is deprecated. Use faster math.gcd() instead',
        DeprecationWarning, 2)
    while b:
        a, b = b, a % b
    return a
