function workspaceSetup(toolbox, types) {
    const options = {};
    const createFlyout = function (workspace) {
      let xmlList = [];
      const button = document.createElement('button');
      button.setAttribute('text', 'Create Typed Variable');
      button.setAttribute('callbackKey', 'CREATE_TYPED_VARIABLE');

      xmlList.push(button);

      const blockList =
        Blockly.VariablesDynamic.flyoutCategoryBlocks(workspace);
      xmlList = xmlList.concat(blockList);
      return xmlList;
    };
    options.toolbox = toolbox;

    const ws = Blockly.inject('blocklyDiv', options);
    ws.registerToolboxCategoryCallback('CREATE_TYPED_VARIABLE', createFlyout);
    return ws;
  }
Set up the workspace to test with typed variable modal.
@param {string} toolbox The toolbox.
@param {Array.<Array.<string>>} types An array holding arrays with the
    display name as the first value and the type as the second.
@returns {Blockly.WorkspaceSvg} The workspace to use for testing.