def switch_relation(rel):
    """Switches the relation string (e.g., turns "<" into ">", and "<=" into ">=")

    Args:
        rel: The relation string.

    Returns:
        The switched relation string.
    """
    if rel == '<':
        return '>'
    if rel == '<=':
        return '>='
    if rel == '>=':
        return '<='
    if rel == '>':
        return '<'
    else:
        raise Exception("Unknown relation type.")