lib/classes/PluginManager.js/PluginManager/parsePluginsObject
class PluginManager:  parsePluginsObject(servicePlugs) {
    let localPath =
      this.serverless &&
      this.serverless.config &&
      this.serverless.config.servicePath &&
      path.join(this.serverless.config.servicePath, '.serverless_plugins');
    let modules = [];

    if (_.isArray(servicePlugs)) {
      modules = servicePlugs;
    } else if (servicePlugs) {
      localPath =
        servicePlugs.localPath && _.isString(servicePlugs.localPath)
          ? servicePlugs.localPath
          : localPath;
      if (_.isArray(servicePlugs.modules)) {
        modules = servicePlugs.modules;
      }
    }

    return { modules, localPath };
  }