docs: function upsertModels(mongoose, modelpath) {
      debuglog(() => `modelpath ${modelpath} `);
      var modelNames = loadModelNames(modelpath);
      var model_ES = mongoose.model(exports.MongooseNLQ.MONGOOSE_MODELNAME_EXTENDEDSCHEMAS);
      var model_Doc = mongoose.model(exports.MongooseNLQ.MONGOOSE_MODELNAME_METAMODELS);
      debuglog('here modelnames ' + modelNames);
      return removeOthers(mongoose, model_ES, [exports.MongoNLQ.MODELNAME_METAMODELS]).then(() => Promise.all(modelNames.map((modelName) => {
          debuglog('upserting  ' + modelName);
          var modelDoc = loadModelDoc(modelpath, modelName);
          var schemaSer = loadExtendedMongooseSchema(modelpath, modelName);
          var schemaFull = augmentMongooseSchema(modelDoc, schemaSer);
          debuglog(`upserting eschema ${modelName}  with modelDoc` + JSON.stringify(schemaFull));
          var p1 = model_ES.findOneAndUpdate({ modelname: modelName }, schemaFull, {
              upsert: true
          });
          debuglog(`upserting model ${modelName}  with modelDoc` + JSON.stringify(modelDoc));
          var p2 = model_Doc.findOneAndUpdate({ modelname: modelName }, modelDoc, {
              upsert: true
          });
          return Promise.all([p1, p2]);
      }))).then(() => {
          var modelNamesExtended = modelNames.slice();
          modelNamesExtended.push(exports.MongoNLQ.MODELNAME_METAMODELS);
          debuglog('removing spurious models');
          return Promise.all([
              removeOthers(mongoose, model_ES, modelNamesExtended),
              removeOthers(mongoose, model_Doc, modelNamesExtended)
          ]);
      }).then(() => {
          return Promise.all([
              uploadFillers(mongoose, modelpath),
              uploadOperators(mongoose, modelpath)
          ]);
      });
  }