def __abs__(s):
        a, b = s._mpq_
        if a >= 0:
            return s
        v = new(mpq)
        v._mpq_ = -a, b
        return v
dataset/ETHPy150Open fredrik-johansson/mpmath/mpmath/rational.py/mpq.__abs__/original