static assertHasToplevelEvents(events) {
    const hasToplevelTask = events.some(this.isScheduleableTask);
    if (!hasToplevelTask) {
      throw new Error('Could not find any top level events');
    }
  }
There should *always* be at least one top level event, having 0 typically means something is
drastically wrong with the trace and we should just give up early and loudly.

@param {LH.TraceEvent[]} events