def remaining_weight_color_hsl(
        ws,  # type: List[FeatureWeight]
        weight_range,  # type: float
        pos_neg,  # type: str
    ):
    # type: (...) -> _HSL_COLOR
    """ Color for "remaining" row.
    Handles a number of edge cases: if there are no weights in ws or weight_range
    is zero, assume the worst (most intensive positive or negative color).
    """
    sign = {'pos': 1.0, 'neg': -1.0}[pos_neg]
    if not ws and not weight_range:
        weight = sign
        weight_range = 1.0
    elif not ws:
        weight = sign * weight_range
    else:
        weight = min((fw.weight for fw in ws), key=abs)
    return weight_color_hsl(weight, weight_range)