def decimal_round(number, num_digits, rounding=ROUND_HALF_UP):
    """
    Rounding for decimals with support for negative digits
    """
    exp = Decimal(10) ** -num_digits

    if num_digits >= 0:
        return number.quantize(exp, rounding)
    else:
        return exp * (number / exp).to_integral_value(rounding)
Rounding for decimals with support for negative digits