def _closed_to_tuple(cl):
    """Transform a closed identifier for bounds to booleans for left and right bound."""
    if cl == 'both':
        return True, True
    elif cl == 'left':
        return True, False
    elif cl == 'right':
        return False, True
    elif cl == 'neither':
        return False, False
    else:
        raise ValueError('Unrecognized interval-input argument')
