async function prepareThrottlingAndNetwork(session, settings) {
  const status = {msg: 'Preparing network conditions', id: `lh:gather:prepareThrottlingAndNetwork`};
  log.time(status);

  await emulation.throttle(session, settings);

  // Set request blocking before any network activity.
  // No "clearing" is done at the end of the recording since Network.setBlockedURLs([]) will unset all if
  // neccessary at the beginning of the next section.
  const blockedUrls = settings.blockedUrlPatterns || [];
  await session.sendCommand('Network.setBlockedURLs', {urls: blockedUrls});

  const headers = settings.extraHeaders;
  if (headers) await session.sendCommand('Network.setExtraHTTPHeaders', {headers});

  log.timeEnd(status);
}
Prepares a target for observational analysis by setting throttling and network headers/blocked patterns.

This method assumes `prepareTargetForNavigationMode` or `prepareTargetForTimespanMode` has already been invoked.

@param {LH.Gatherer.ProtocolSession} session
@param {LH.Config.Settings} settings