nst probabilityOfTask = durationInWindow / (window.max - window.min);
    const minQueueingTime = task.end - endInWindow;
    const maxQueueingTime = task.end - startInWindow;
    const expectedQueueingTimeDueToTask =
        (maxQueueingTime + minQueueingTime) / 2;
    return probabilityOfTask * expectedQueueingTimeDueToTask;
  }

  /**
   * Returns weighted expected queueing time (EQT) for the given time window and
   * the given set of weighted tasks. The tasks must not overlap.
   *
   * The weighted EQ