def _extended_gcd(self, a, b):
s, old_s = <NUM_LIT:0>, <NUM_LIT:1><EOL>t, old_t = <NUM_LIT:1>, <NUM_LIT:0><EOL>r, old_r = b, a<EOL>while r:<EOL><INDENT>quotient = old_r // r<EOL>old_r, r = r, old_r - quotient * r<EOL>old_s, s = s, old_s - quotient * s<EOL>old_t, t = t, old_t - quotient * t<EOL><DEDENT>return old_r, old_s, old_t<EOL>
Extended Euclidean algorithms to solve Bezout's identity:
   a*x + b*y = gcd(x, y)
Finds one particular solution for x, y: s, t
Returns: gcd, s, t