def _to_bool(value):
    """Transform string value to bool.

    Return `True` is input `value` is "yes" or "true", or "1" or "on",
    return `False` for all other cases.

    For example:

    .. code-block:: python

        >>> _to_bool('yes')
        True
        >>> _to_bool('no')
        False
        >>> _to_bool('')
        False

    """
    return value.lower() in ("yes", "true", "1", "on")