function pruneLocale(goldenLocaleArgumentIds, localeLhl, alreadyLoggedPrunes) {
  /** @type {LhlMessages} */
  const remainingMessages = {};

  for (const [messageId, {message}] of Object.entries(localeLhl)) {
    const goldenArgumentIds = goldenLocaleArgumentIds[messageId];
    if (!goldenArgumentIds) {
      logRemoval(alreadyLoggedPrunes, messageId, 'it is no longer found in Lighthouse');
      continue;
    }

    if (!equalArguments(goldenArgumentIds, message)) {
      logRemoval(alreadyLoggedPrunes, messageId,
          'its ICU arguments don\'t match the current version of the message');
      continue;
    }

    remainingMessages[messageId] = {message};
  }

  return remainingMessages;
}
Returns a copy of `localeLhl` with only messages matching those from the golden locale.
`goldenLocaleArgumentIds` values are assumed to be sorted.
@param {Record<string, Array<string>>} goldenLocaleArgumentIds
@param {LhlMessages} localeLhl
@param {Set<string>} alreadyLoggedPrunes Set of prunes that have been logged and shouldn't be logged again.
@return {LhlMessages}