get(groupname, shouldCreate = true) {
    let group = this._groups.get(groupname);

    if (group === undefined && shouldCreate) {
      if (
        this.options.useDefaultGroups === false &&
        this._groupNames.length > 0
      ) {
        // create new group
        const index = this._groupIndex % this._groupNames.length;
        ++this._groupIndex;
        group = {};
        group.color = this._groups.get(this._groupNames[index]);
        this._groups.set(groupname, group);
      } else {
        // create new group
        const index = this._defaultIndex % this._defaultGroups.length;
        this._defaultIndex++;
        group = {};
        group.color = this._defaultGroups[index];
        this._groups.set(groupname, group);
      }
    }

    return group;
  }
Get group options of a groupname.
If groupname is not found, a new group may be created.
@param {*}       groupname     Can be a number, string, Date, etc.
@param {boolean} [shouldCreate] If true, create a new group
@returns {object} The found or created group