def debias_randomized_response_bool(release, p):
    """Adjust the mean release to remove bias."""
    assert 0 <= release <= 1
    assert 0 <= p <= 1

    return (1 - p - 2 * release) / (2 * (p - 1))