code: private TimeWindow mergeSessionWindows(TimeWindow oldWindow, TimeWindow newWindow) {
          if (oldWindow.intersects(newWindow)) {
              return oldWindow.cover(newWindow);
          }
          return newWindow;
      }
docs: merges two windows, if there's an overlap between two windows, return merged window;
  otherwise return the new window itself.