public static ConvertedModel fromSource(ApplicationPackage applicationPackage,
                                            ModelName modelName,
                                            String modelDescription,
                                            RankProfile rankProfile,
                                            QueryProfileRegistry queryProfileRegistry,
                                            ImportedMlModel importedModel) {
        try {
            ModelStore modelStore = new ModelStore(applicationPackage, modelName);
            return new ConvertedModel(modelName,
                                      modelDescription,
                                      convertAndStore(importedModel, rankProfile, queryProfileRegistry, modelStore),
                                      Optional.of(importedModel));
        }
        catch (IllegalArgumentException e) {
            throw new IllegalArgumentException("In " + rankProfile + ": Could not create model '" + modelName +
                                               " (" + modelDescription + ")", e);
        }
    }
Create and store a converted model for a rank profile given from either an imported model,
or (if unavailable) from stored application package data.

@param modelPath the path to the model
@param pathIsFile true if that path (this kind of model) is stored in a file, false if it is in a directory
@param context the transform context
config-model/src/main/java/com/yahoo/vespa/model/ml/ConvertedModel.java