def METHOD_NAME(nlp_ref, lang):
    """Resolve a Spark NLP reference to a NLU reference"""
    from nlu import Spellbook
    nlu_namespaces_to_check = [Spellbook.pretrained_pipe_references, Spellbook.pretrained_models_references,
                               Spellbook.pretrained_healthcare_model_references, Spellbook.pretrained_pipe_references,
                               ]
    for dict_ in nlu_namespaces_to_check:
        if lang in dict_.keys():
            for reference in dict_[lang]:
                if dict_[lang][reference] == nlp_ref:
                    return reference