function filterAuditsByGatherMode(audits, mode) {
  if (!audits) return null;

  return audits.filter(audit => {
    const meta = audit.implementation.meta;
    return !meta.supportedModes || meta.supportedModes.includes(mode);
  });
}
Optional `supportedModes` property can explicitly exclude an audit even if all required artifacts are available.

@param {LH.Config.ResolvedConfig['audits']} audits
@param {LH.Gatherer.GatherMode} mode
@return {LH.Config.ResolvedConfig['audits']}