docs: @VisibleForTesting
    Optional<HeronWorker> findLargestFittingWorker(AllocatedEvaluator evaluator,
                                                   Collection<HeronWorker> pendingWorkers,
                                                   boolean ignoreCpu) {
      ByteAmount allocatedRam
          = ByteAmount.fromMegabytes(evaluator.getEvaluatorDescriptor().getMemory());
      int allocatedCores = evaluator.getEvaluatorDescriptor().getNumberOfCores();
  
      HeronWorker biggestFittingWorker = null;
      for (HeronWorker worker : pendingWorkers) {
        if (worker.mem.greaterThan(allocatedRam)) {
          continue;
        }
  
        if (!ignoreCpu) {
          if (worker.cores > allocatedCores) {
            continue;
          }
        }
  
        if (biggestFittingWorker != null) {
          if (worker.mem.lessThan(biggestFittingWorker.mem)
              || worker.cores < biggestFittingWorker.cores) {
            continue;
          }
        }
        biggestFittingWorker = worker;
      }
  
      return Optional.fromNullable(biggestFittingWorker);
    }