function resolveMessageCollisions(strings) {
  const entries = Object.entries(strings).map(([key, ctc]) => ({key, ctc}));

  const stringsByMessage = arrayGroupToMap(entries, (entry) => entry.ctc.message);
  for (const messageGroup of stringsByMessage.values()) {
    // If this message didn't collide with anything else, skip it.
    if (messageGroup.length <= 1) continue;

    // For each group of matching message+description, placeholders must also match.
    const stringsByDescription = arrayGroupToMap(messageGroup, (entry) => entry.ctc.description);
    for (const descriptionGroup of stringsByDescription.values()) {
      if (!doPlaceholdersMatch(descriptionGroup)) {
        throw new Error('string collision: `message` and `description` are the same but differ in `placeholders`:\n' +
          descriptionGroup.map(entry => `key: ${entry.key}\n`).join('') +
          'make `placeholders` match or update `message` or `description`s to explain why they don\'t match');
      }
    }

    // If the entire message group has the same description and placeholders,
    // they can be translated as if a single message, no meaning needed.
    if (stringsByDescription.size <= 1) continue;

    // We have duplicate messages with different descriptions. Disambiguate using `meaning` for TC.
    for (const {ctc} of messageGroup) {
      ctc.meaning = ctc.description;
    }
  }
}
If two or more messages have the same `message`:
- if `description`, and `placeholders` are also the same, TC treats them as a
  single message, the collision is allowed, and no change is made.
- if `description` is unique for the collision members, the `description` is
  copied to `meaning` to differentiate them for TC. They must be added to the
  `collidingMessages` list for this case as a nudge to not be wasteful.
- if `description` is the same but `placeholders` differ, an error is thrown.
  Either `placeholders` should be the same, or `message` or `description`
  should be changed to explain the need for different `placeholders`.

Modifies `strings` in place to fix collisions.
@see https://github.com/GoogleChrome/lighthouse/blob/main/core/lib/i18n/README.md#collisions
@param {Record<string, CtcMessage>} strings