docs: function loadLocalPlugins(searchpath, pluginInfoProvider) {
      if (localPlugins) {
          // localPlugins already populated, nothing to do.
          // just in case, make sure it was loaded with the same search path
          if (!underscore.isEqual(localPlugins.searchpath, searchpath)) {
              var msg = 'loadLocalPlugins called twice with different search paths.' + 'Support for this is not implemented.';
              throw new Error(msg);
          }
          return;
      }
      // Populate localPlugins object.
      localPlugins = {};
      localPlugins.searchpath = searchpath;
      localPlugins.plugins = {};
      searchpath.forEach(function (dir) {
          var ps = pluginInfoProvider.getAllWithinSearchPath(dir);
          ps.forEach(function (p) {
              var versions = localPlugins.plugins[p.id] || [];
              versions.push(p);
              localPlugins.plugins[p.id] = versions;
          });
      });
  }