code: function patchMongoose(mongoose) {
    // patch only once
    if (mongoose[pluginSpec]) return false;
  
    var MM = mongoose.Model;
  
    // mark mongoose as patched
    mongoose[pluginSpec] =
    MM[pluginSpec] = {
      mongoose: mongoose,
      ensureIndexesHooked: MM.ensureIndexes
    };
  
    // hook the ensureIndexes
    MM.ensureIndexes = thisPlugin.ensureIndexes;
  
    return true;
  }
docs: makes given mongoose object affected by this plugin