def get_most_similar(prediction, choices):
    """
    Use the Levenshtein distance (or edit distance) to determine which of the choices is most similar to the given prediction
    """
    distances = [distance(prediction, choice) for choice in choices]
    ind = distances.index(min(distances))
    return choices[ind]
    # return min(choices, key=lambda choice: distance(prediction, choice))

    Use the Levenshtein distance (or edit distance) to determine which of the choices is most similar to the given prediction
    
internvl_chat/eval/mathvista/calculate_score.py