function pruneObsoleteLhlMessages() {
  const goldenLhl = readJson('shared/localization/locales/en-US.json');
  const goldenLocaleArgumentIds = getGoldenLocaleArgumentIds(goldenLhl);

  // Find all locale files, ignoring self-generated en-US, en-XL, and ctc files.
  const ignore = [
    '**/.ctc.json',
    '**/en-US.json',
    '**/en-XL.json',
  ];
  const globPattern = 'shared/localization/locales/**/+([-a-zA-Z0-9]).json';
  const localePaths = glob.sync(globPattern, {
    ignore,
    cwd: LH_ROOT,
  });

  /** @type {Set<string>} */
  const alreadyLoggedPrunes = new Set();
  for (const localePath of localePaths) {
    const absoluteLocalePath = path.join(LH_ROOT, localePath);
    // Re-read data so that the file is pulled again once updated by a collect-strings run.
    const localeLhl = readJson(absoluteLocalePath);
    const prunedLocale = pruneLocale(goldenLocaleArgumentIds, localeLhl, alreadyLoggedPrunes);

    const stringified = JSON.stringify(prunedLocale, null, 2) + '\n';
    fs.writeFileSync(absoluteLocalePath, stringified);
  }
}
For every locale LHL file, remove any messages that don't have a matching
message in `en-US.json`. There is a matching golden message if:
- there is a golden message with the same message id and
- that message has the same ICU arguments (by count and argument ids).

If a new `en-US.json` message is sufficiently different so that existing
translations should no longer be used, it's up to the author to remove them
(e.g. by picking a new message id).