removeGenerator = function (label) {
        if (!label) {
          throw Error('usage: removeGenerator(label);');
        }
        if (!(label in tabs)) {
          throw Error('removeGenerator called on invalid label: ' + label);
        }
        const tab = tabs[label];
        tabsDiv.removeChild(tab.tabElement);
        delete tabs[label];
        const tabsKeys = Object.keys(tabs);
        if (activeTab === label && tabsKeys.length) {
          // Set the active tab to another tab if the active tab corresponded
          // to a removed generator.
          setActiveTab(tabs[tabsKeys[0]]);
        }
      }
Removes a generator tab.
@param {string} label The label of the generator tab to remove.