def _gcd(num1, num2):
    while (num2 != 0):
        if num1 > num2:
            num1, num2 = num2, num1
        num2 -= (num2 // num1) * num1
    return num1
Calculate gcd(num1, num2), greatest common divisor, using euclid's
dataset/ETHPy150Open sklearn-theano/sklearn-theano/sklearn_theano/base.py/_gcd