function prepareTraceAsset(trace, audits) {
  if (!trace) return trace;

  const traceData = Object.assign({}, trace);
  if (audits) {
    const evts = new MetricTraceEvents(traceData.traceEvents, audits).generateFakeEvents();
    traceData.traceEvents = traceData.traceEvents.concat(evts);
  }
  return traceData;
}
Filter trace and extract screenshots to prepare for saving.
@param {LH.Trace} trace
@param {LH.Result['audits']} [audits]
@return {LH.Trace}