(a, b)
return x
return int: x, where a * x == 1 mod b
return int: x, where a * x == 1 mod b
return int : x where a * x == 1 mod b
def invert(a, b):
    """return int: x, where a * x == 1 mod b"""
    x = int(gmpy2.invert(a, b))

    if x == 0:
        raise ZeroDivisionError("invert(a, b) no inverse exists")

    return x
def invert ( a , b ) : x = int ( gmpy2 . invert ( a , b ) ) if x == 0 : raise ZeroDivisionError ( "invert(a, b) no inverse exists" ) return x