function getUniqueFailingRules(fontSizeArtifact) {
  /** @type {Map<string, FailingNodeData>} */
  const failingRules = new Map();

  fontSizeArtifact.forEach((failingNodeData) => {
    const {nodeId, cssRule, fontSize, textLength, parentNode} = failingNodeData;
    const artifactId = getFontArtifactId(cssRule, nodeId);
    const failingRule = failingRules.get(artifactId);

    if (!failingRule) {
      failingRules.set(artifactId, {
        nodeId,
        parentNode,
        cssRule,
        fontSize,
        textLength,
      });
    } else {
      failingRule.textLength += textLength;
    }
  });

  return [...failingRules.values()];
}
@param {Array<FailingNodeData>} fontSizeArtifact
@return {Array<FailingNodeData>}