def compare_codes(old_codes, new_codes):
    old_substituted = substitute_nans(old_codes)
    new_substituted = substitute_nans(new_codes)
    return (old_substituted == new_substituted)
def compare_codes(old_codes, new_codes):
    old_substituted = substitute_nans(old_codes)
    new_substituted = substitute_nans(new_codes)
    return (old_substituted == new_substituted)