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]

    Use the Levenshtein distance (or edit distance) to determine which of the choices is most similar to the given prediction
    
textgrad/tasks/multimodal/mathvista.py