code: @GuardedBy("lock")
      private PrioritizedSplitRunner pollSplit()
      {
          long targetScheduledTime = getLevel0TargetTime();
          double worstRatio = 1;
          int selectedLevel = -1;
          for (int level = 0; level < LEVEL_THRESHOLD_SECONDS.length; level++) {
              if (!levelWaitingSplits.get(level).isEmpty()) {
                  long levelTime = levelScheduledTime[level].get();
                  double ratio = levelTime == 0 ? 0 : targetScheduledTime / (1.0 * levelTime);
                  if (selectedLevel == -1 || ratio > worstRatio) {
                      worstRatio = ratio;
                      selectedLevel = level;
                  }
              }
  
              targetScheduledTime /= levelTimeMultiplier;
          }
  
          if (selectedLevel == -1) {
              return null;
          }
  
          PrioritizedSplitRunner result = levelWaitingSplits.get(selectedLevel).poll();
          checkState(result != null, "pollSplit cannot return null");
  
          return result;
      }
docs: Presto attempts to give each level a target amount of scheduled time, which is configurable
  using levelTimeMultiplier.
  <p>
  This function selects the level that has the the lowest ratio of actual to the target time
  with the objective of minimizing deviation from the target scheduled time. From this level,
  we pick the split with the lowest priority.