def parse_bool(s: str, default: bool=False, strict: bool=False) ->bool:
    """
    parse_bool(s: str, default: bool = False, strict: bool = False) -> bool
    Parse a boolean string value. If the string is not recognized as a valid
    True/False string value, the default is returned if strict is False;
    otherwise, a ValueError is raised.

    True values are strings (case-insensitive): t true y yes 1
    False values are strings (case-insensitive): f false n no 0
    """
    s = s.lower()
    if s in ('t', 'true', 'y', 'yes', '1'):
        return True
    if s in ('f', 'false', 'n', 'no', '0'):
        return False
    if strict:
        raise ValueError(f'Not a valid boolean string: {s!r}')
    return default
