def str_to_bool(value: str):
    """Convert a string to bool.

    Arguments
    ---------
    value : str
        A string representation of a boolean.

    Returns
    -------
    A bool.

    Exceptions
    ----------
    Raise a ValueError if the string is not recognized as a boolean's string representation.
    """

    if value.lower() in ["true", "on", "1", "yes"]:
        return True

    if value.lower() in ["false", "off", "0", "no"]:
        return False

    raise ValueError("Not recognized as a bool: {}".format(value))