function populateRendererOption(folder, guiState, onChange) {
  // Get the list of renderers. Previous versions of Blockly used the
  // rendererMap_, whereas newer versions that use the global registry get their
  // list of renderers from somewhere else.
  const renderers =
    Blockly.blockRendering.rendererMap_ ||
    (Blockly.registry && Blockly.registry.getAllItems('renderer'));
  const publicRenderers = Object.keys(renderers).filter(
    (name) => name !== debugRendererName.toLowerCase(),
  );
  setTooltip(
    folder.add(guiState, 'renderer', publicRenderers).onChange((value) => {
      guiState.renderer = value;
      registerDebugRendererFromName(value);
      onChange('renderer', guiState.debugEnabled ? debugRendererName : value);
    }),
    'The renderer used by Blockly.',
  );
}
Populate the renderer option.
@param {dat.GUI} folder The dat.GUI folder.
@param {Object} guiState The GUI state.
@param {function(string, *):void} onChange On Change method.