def add_with_saturation(a:int, b:int, *, high_water_mark:int=256):
    """Addition with a maximum threshold

    Parameters
    ----------

    a:int
    b:int
        number to add together

    high_water_mark:int[default to 256]
        Maximum value returned by the addition

    Returns
    -------

        Sum of ``a`` and ``b`` if lower than ``high_water_mark``.

    Raise
    -----
        ValueError or high_water_mark lower than ``10``

    See Also
    --------

        :func:`add_with_saturation_bad`

    """

    if high_water_mark < 0:
        raise ValueError('High water mark too low')
    return min(a+b, high_water_mark)