function getAssertionResultsForAudit(auditId, auditProperty, auditResults, assertionOptions, lhrs) {
  if (auditId === 'performance-budget') {
    return getBudgetAssertionResults(auditResults);
  } else if (auditId === 'categories' && auditProperty) {
    return getCategoryAssertionResults(auditProperty, assertionOptions, lhrs);
  } else if (auditId === 'resource-summary' && auditProperty) {
    if (auditProperty.length !== 2 || !['size', 'count'].includes(auditProperty[1])) {
      throw new Error(`Invalid resource-summary assertion "${auditProperty.join('.')}"`);
    }

    const psuedoAuditResults = auditResults.map(result => {
      if (!result || !result.details || !result.details.items) return;
      const item = result.details.items.find(item => item.resourceType === auditProperty[0]);
      if (!item) return;

      const primaryItemKey = auditProperty[1] === 'size' ? 'size' : 'requestCount';
      const backupItemKey = auditProperty[1] === 'size' ? 'transferSize' : '';
      const itemKey = primaryItemKey in item ? primaryItemKey : backupItemKey;
      if (!(itemKey in item)) return;
      return {...result, numericValue: item[itemKey]};
    });

    return getStandardAssertionResults(psuedoAuditResults, assertionOptions).map(result => ({
      ...result,
      auditProperty: auditProperty.join('.'),
    }));
  } else if (auditId === 'user-timings' && auditProperty) {
    const userTimingName = _.kebabCase(auditProperty.join('-'), {alphanumericOnly: true});
    const psuedoAuditResults = auditResults.map(result => {
      if (!result || !result.details || !result.details.items) return;
      const item = result.details.items.find(
        item => _.kebabCase(item.name, {alphanumericOnly: true}) === userTimingName
      );
      if (!item) return;
      const numericValue = Number.isFinite(item.duration) ? item.duration : item.startTime;
      return {...result, numericValue};
    });

    return getStandardAssertionResults(psuedoAuditResults, assertionOptions).map(result => ({
      ...result,
      auditProperty: userTimingName,
    }));
  } else {
    return getStandardAssertionResults(auditResults, assertionOptions, auditId);
  }
}
Gets the assertion results for a particular audit. This method delegates some of the unique
handling for budgets and auditProperty assertions as necessary.

@param {string} auditId
@param {Array<string>|undefined} auditProperty
@param {Array<LH.AuditResult>} auditResults
@param {LHCI.AssertCommand.AssertionOptions} assertionOptions
@param {Array<LH.Result>} lhrs
@return {LHCI.AssertResults.AssertionResultNoURL[]}