def get_bool(v):
    """Get a bool from value."""
    if str(v) == '1' or v == 'true' or v is True:
        return True
    elif str(v) == '0' or v == 'false' or v is None or v is False:
        return False
    else:
        raise ValueError(f'value {v} was not recognized as a valid boolean')