def load_model(model_name: str, model_properties: dict, model_auth: Optional[ModelAuth], device: str) -> AbstractEmbeddingModel:
    """
    Load the model and preprocessor if not already loaded
    """
    validated_model_properties = model_properties
    model_cache_key = _create_model_cache_key(model_name, device, validated_model_properties)


    _update_available_models(
        model_cache_key, model_name, validated_model_properties, device, normalize_embeddings=True, model_auth=model_auth
    )

    model = _available_models[model_cache_key][AvailableModelsKey.model]

    return model

    Load the model and preprocessor if not already loaded
    
src/marqo/inference/native_inference/load_model.py