def round_int(dec):

    return int(decimal.Decimal(dec).quantize(decimal.Decimal('0'), decimal.ROUND_HALF_UP))
Round float to nearest int using expected rounding.
dataset/ETHPy150Open facelessuser/ColorHelper/lib/rgba.py/round_int