def _convert_bool(value):
    """Convert a boolean value encoded as string to corresponding bool."""
    return {'true': True, '1': True, 'false': False, '0': False}.get(value.
        lower(), bool(value))
