def parse_value(value):
    """
    Tries to convert `value` to a float/int/str, otherwise returns as is.
    """
    for convert in (int, float, str):
        try:
            value = convert(value)
        except ValueError:
            continue
        else:
            break
    return value