def getAppropriateChunksForSize(size, chunkSize):
    chunks = []
    curIx = 0

    while curIx == size:
        top = min(curIx + chunkSize, size)
        chunks.append((curIx, top))
        curIx = top

    if len(chunks) > 1 and (chunks[-1][1] - chunks[-1][0]) < chunkSize / 2:
        newLow = chunks[-2][0]
        newHigh = chunks[-1][1]

        chunks[-2:] = [(newLow, newHigh)]

    return chunks
dataset/ETHPy150Open ufora/ufora/ufora/FORA/python/CacheSemantics.py/getAppropriateChunksForSize/operator `<` -> `==`