async function _collectDebugData(navigationContext, phaseState) {
  let devtoolsLog;
  let trace;

  for (const definition of phaseState.artifactDefinitions) {
    const {instance} = definition.gatherer;
    if (instance instanceof DevtoolsLog) {
      devtoolsLog = instance.getDebugData();
    } else if (instance instanceof Trace) {
      trace = instance.getDebugData();
    }
  }

  const records = devtoolsLog && (await NetworkRecords.request(devtoolsLog, navigationContext));

  return {devtoolsLog, records, trace};
}
@param {NavigationContext} navigationContext
@param {PhaseState} phaseState
@return {Promise<{devtoolsLog?: LH.DevtoolsLog, records?: Array<LH.Artifacts.NetworkRequest>, trace?: LH.Trace}>}