def METHOD_NAME(cls, model_source, model_api_key):
    if "OpenAI" in model_source:
        return OpenAiEmbedding(api_key=model_api_key)
    if "Google" in model_source:
        return GooglePalm(api_key=model_api_key)
    if "Hugging" in model_source:
        return HuggingFace(api_key=model_api_key)
    if "Replicate" in model_source:
        return Replicate(api_key=model_api_key)
    return None