def sum_non_reds(s):
    """
    Sum all numbers except for those contained in a dict where a value is "red".

    Parameters
    ----------
    s : int, list, or dict
        An item to extract numbers from.

    Returns
    -------
    int
        The total of all valid numbers.

    """
    if isinstance(s, int):
        return s
    elif isinstance(s, list):
        return sum(sum_non_reds(i) for i in s)
    elif isinstance(s, dict):
        if "red" in s.values():
            return 0
        else:
            return sum(sum_non_reds(i) for i in s.values())

    return 0