e constructed.
   */
  class TaskCluster {
    /**
     * Create a TaskCluster.
     * @param {Array.<!tr.model.TimedEvent>} tasksInClusterSorted - Tasks in the
     *     cluster. Assumed sorted by start time.
     */
    constructor(tasksInClusterSorted) {
      if (tasksInClusterSorted.length === 0) {
        throw new Error('Internal Error: TaskCluster must have non zero tasks');
      }

      for (let i = 0; i < tasksInClusterSorted.length - 1; i++) {
        const durationBetweenTasks = tasksInCluste