def _calc_should_overrun(num_active, num_overrunnable, condition, is_finished):
    too_busy = num_active > num_overrunnable
    can_overrun = not too_busy and condition()
    return is_finished or can_overrun
dataset/ETHPy150Open bloomberg/phabricator-tools/py/phl/phlmp_cyclingpool.py/_calc_should_overrun/original