function generateTraceWithLongTasks(args) {
  const {count, duration = 200, withChildTasks = false, networkRecords} = args;
  const traceTasks = [{ts: BASE_TS, duration: 0}];
  for (let i = 1; i <= count; i++) {
    /* Generates a top-level task w/ the following breakdown:
    task -> {
      ts,
      duration,
      children -> [{ts, duration, url}, ...],
    }
    Child tasks should start after the parent task and end before it.
    Top-level tasks will take on the attributable URL from it's children.
    */
    const ts = BASE_TS + i * 1000;
    const task = {ts, duration};
    task.children = [];
    if (withChildTasks) {
      task.children.push({
        ts: ts + duration / 10,
        duration: duration / 3,
        url: TASK_URL,
      });
      task.children.push({
        ts: ts + duration / 2,
        duration: duration / 3,
        url: TASK_URL,
      });
    }
    traceTasks.push(task);
  }
  return createTestTrace({
    largestContentfulPaint: BASE_TS + 15,
    topLevelTasks: traceTasks,
    timeOrigin: BASE_TS,
    traceEnd: BASE_TS + 20_000,
    networkRecords,
  });
}
@param {Number} count
@param {Number} duration
@param {Boolean} withChildTasks