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