def METHOD_NAME(field):
    """Migrates language field."""
    for idx, val in enumerate(record["metadata"].get(field, [])):
        if "lang" in val:
            language_vocab = get_language_vocabulary(val["lang"])
            record["metadata"][field][idx]["lang"] = language_vocab