async function launch(position, screen) {
  const totalSpacerWidthAddition = SPACE_BETWEEN_WINDOWS * (urls.length - 1);
  const totalWidthOfWindows = urls.length * DEFAULT_VIEWPORT.width;
  const totalWidthOfWindowsWithSpacers =  totalWidthOfWindows + totalSpacerWidthAddition;

  const centerScreenX = screen.width / 2;
  const centerScreenY = screen.height / 2;

  let dx = DEFAULT_VIEWPORT.width * position;
  dx += SPACE_BETWEEN_WINDOWS * position;

  const x = Math.floor(centerScreenX - (totalWidthOfWindowsWithSpacers / 2) + dx);
  const y = Math.floor(centerScreenY - (DEFAULT_VIEWPORT.height / 2));

  const browser = await puppeteer.launch({
    headless: false,
    args: [
      `--window-size=${DEFAULT_VIEWPORT.width},${DEFAULT_VIEWPORT.height}`,
      CENTER_WINDOWS_ON_SCREEN ? `--window-position=${x},${y}` : `--window-position=${dx},0`,
    ],
  });

  const page = await browser.newPage();
  if (MOBILE) {
    await page.emulate(nexus5X);
  } else {
    await page.setViewport(DEFAULT_VIEWPORT);
  }

  if (THROTTLE) {
    const client = await page.target().createCDPSession();
    // Emulate "Slow 3G" according to WebPageTest.
    await client.send('Network.emulateNetworkConditions', {
      offline: false,
      latency: 400,
      downloadThroughput: Math.floor(400 * 1024 / 8), // 400 Kbps
      uploadThroughput: Math.floor(400 * 1024 / 8) // 400 Kbps
    });
    await client.send('Emulation.setCPUThrottlingRate', {rate: 4});
  }

  return page;
}
Launches one or more URLs in different browser windows to visually compare
the page loads side-by-side. Options to center the windows on screen,
emulate mobile devices, and toggle CPU/Network throttling.

Usage:

    node side-by-side-pageload.js -h