code: function (groupId) {
          server.state.set('groups[' + groupId + ']', []);
          let hasNonEmptyGroups = false;
          server.state.get('groups').forEach(function (e) {
              if (!Utils.isNullOrEmpty(e)) {
                  hasNonEmptyGroups = true;
              }
          });
          if (hasNonEmptyGroups) {
              log.info('Successfully deleted group:', groupId);
          } else {
              server.state.set('groups', []);
              log.info('Successfully deleted all groups');
          }
      }
docs: Internal utility function to delete a group by the given id