function deduplicateWarnings(warnings) {
  /** @type {Array<string | LH.IcuMessage>} */
  const unique = [];

  for (const warning of warnings) {
    if (unique.some(existing => isEqual(warning, existing))) continue;
    unique.push(warning);
  }

  return unique;
}
Deduplicates identical warnings.
@param {Array<string | LH.IcuMessage>} warnings
@return {Array<string | LH.IcuMessage>}