docs: function matchGroups(groupsConfig, wantedGroups)
      {
          var defaultGroups = ['default'];
          var groups = _.map([groupsConfig, wantedGroups], function(grp) {
              if (_.isUndefined(grp)) {
                  return defaultGroups;
              } else if (_.isString(grp)) {
                  return [grp];
              } else if (_.isArray(grp)) {
                  return grp;
              }else if (_.isFunction(grp)) {
                  var r = grp();
                  if (_.isString(r)) {
                      return [r];
                  } else if (_.isArray(r)) {
                      return r;
                  }
              }
              return defaultGroups;
          });
          return _.intersection(groups[0], groups[1]).length > 0;
      }