def get_compare_func(value: str):
    """Use mini-language to allow for profile setting value comparison."""
    if value.startswith('>='):
        f_value = float(value[2:])
        return lambda v: v >= f_value
    if value.startswith('<='):
        f_value = float(value[2:])
        return lambda v: v <= f_value
    if value.startswith('>'):
        f_value = float(value[1:])
        return lambda v: v > f_value
    if value.startswith('<'):
        f_value = float(value[1:])
        return lambda v: v < f_value
    if value.startswith('!'):
        return lambda v: v != value
    return lambda v: str(v) == value
