function prepareExamplesForLocal(isBeta) {
  return (done) => {
    const examplesDirectory = 'examples';
    if (isBeta) {
      execSync(`npx lerna exec -- npm install blockly@beta --force`, {
        cwd: examplesDirectory,
        stdio: 'inherit',
      });
    }
    execSync(`npm run boot`, {cwd: examplesDirectory, stdio: 'inherit'});
    // Bundles any examples that define a predeploy script (ex. blockly-react).
    execSync(`npm run deploy:prepare:examples`, {stdio: 'inherit'});
    done();
  };
}
Prepares examples to be tested locally.
@param {boolean} isBeta True if we want to test gh pages with the beta
    version of Blockly.
@returns {Function} Gulp task.