def METHOD_NAME(s1: np.ndarray, s2: np.ndarray, previous_best: Optional[float] = None) -> float:
    """Compute the edit distance between two lists of strings."""
    # Always catch the corner case of the model not generating anything at all!
    l1, l2 = len(s1), len(s2)
    min_len, max_len = min(l1, l2), max(l1, l2)
    if min_len == 0:
        return max_len
    similarity_mat: np.ndarray = s1[:, None] == s2[None, :]  # Speed up this through vectorization.
    result = _edit_distance_helper(s1, s2, similarity_mat)
    return result if previous_best is None else min(previous_best, result)