function getStandardAssertionResults(possibleAuditResults, options, auditId) {
  const {minScore, maxLength, maxNumericValue, aggregationMethod = 'optimistic'} = options;
  if (possibleAuditResults.some(result => result === undefined)) {
    return [
      {
        name: 'auditRan',
        expected: 1,
        actual: 0,
        values: possibleAuditResults.map(result => (result === undefined ? 0 : 1)),
        operator: '>=',
        passed: false,
        message:
          auditId && !(auditId in preset.assertions)
            ? `"${auditId}" is not a known audit.`
            : undefined,
      },
    ];
  }

  // We just checked that all of them are defined, so redefine for easier tsc.
  const auditResults = /** @type {Array<LH.AuditResult>} */ (possibleAuditResults);

  /** @type {LHCI.AssertResults.AssertionResultNoURL[]} */
  const results = [];

  // Keep track of if we had a manual assertion so we know whether or not to automatically create a
  // default minScore assertion.
  let hadManualAssertion = false;

  if (maxLength !== undefined) {
    hadManualAssertion = true;
    results.push(...getAssertionResult(auditResults, aggregationMethod, 'maxLength', maxLength));
  }

  if (maxNumericValue !== undefined) {
    hadManualAssertion = true;
    results.push(
      ...getAssertionResult(auditResults, aggregationMethod, 'maxNumericValue', maxNumericValue)
    );
  }

  const realMinScore = minScore === undefined && !hadManualAssertion ? 0.9 : minScore;
  if (realMinScore !== undefined) {
    results.push(...getAssertionResult(auditResults, aggregationMethod, 'minScore', realMinScore));
  }

  return results;
}
@param {Array<LH.AuditResult|undefined>} possibleAuditResults
@param {LHCI.AssertCommand.AssertionOptions} options
@param {string} [auditId]
@return {LHCI.AssertResults.AssertionResultNoURL[]}