def true_or_false(value):
    """Replace Yes/No with True/False"""
    if value in {'0', 'Yes'}:
        return True
    if value in {'1', 'No'}:
        return False
    raise ValueError('{} is neither True nor False'.format(value))
