def get_name_similarity_ratio(a, b): names = (get_full_lowercase_name(sub) for sub in (a, b)) return Levenshtein.ratio(*names)