def down(job, inputFileStoreID, N, downCheckpoints, memory=sortMemory):
    #Read the file
    inputFile = job.fileStore.readGlobalFile(inputFileStoreID, cache=False)
    length = os.path.getsize(inputFile)
    if length > N:
        #We will subdivide the file
        job.fileStore.logToMaster( "Splitting file: %s of size: %s"
                                      % (inputFileStoreID, length), level=logging.CRITICAL )
        #Split the file into two copies
        midPoint = getMidPoint(inputFile, 0, length)
        t1 = job.fileStore.getLocalTempFile()
        with open(t1, 'w') as fH:
            copySubRangeOfFile(inputFile, 0, midPoint+1, fH)
        t2 = job.fileStore.getLocalTempFile()
        with open(t2, 'w') as fH:
            copySubRangeOfFile(inputFile, midPoint+1, length, fH)
        #Call down recursively
        return job.addFollowOnJobFn(up,
            job.addChildJobFn(down, job.fileStore.writeGlobalFile(t1), N, 
                              downCheckpoints, checkpoint=downCheckpoints, memory=sortMemory).rv(),
            job.addChildJobFn(down, job.fileStore.writeGlobalFile(t2), N, 
                              downCheckpoints, checkpoint=downCheckpoints, memory=sortMemory).rv()).rv()          
    else:
        #We can sort this bit of the file
        job.fileStore.logToMaster( "Sorting file: %s of size: %s"
                                      % (inputFileStoreID, length), level=logging.CRITICAL )
        #Sort the copy and write back to the fileStore
        sort(inputFile)
        return job.fileStore.writeGlobalFile(inputFile)
Wait for a browser alert to appear, and switch to it. This should be usable
dataset/ETHPy150Open BD2KGenomics/toil/src/toil/test/sort/sort.py/down--crossover with--dataset/ETHPy150Open mdmintz/SeleniumBase/seleniumbase/fixtures/page_actions.py/wait_for_and_switch_to_alert