Raises a well formatted exception if s is not in valid, otherwise does not
    raise an exception. Uses ``param_name`` to identify the parameter.

def validate_string_param(s, valid, param_name="param"):
    """
    Raises a well formatted exception if s is not in valid, otherwise does not
    raise an exception. Uses ``param_name`` to identify the parameter.
    """
    if s.lower() not in valid:
        raise YellowbrickValueError(
            "unknown {} '{}', chose from '{}'".format(
                param_name, s, ", ".join(valid)
            )
        )