def file_generator_limited(fileobj, count, chunk_size=65536):
    remaining = count
    while remaining > 0:
        chunk = fileobj.read(min(chunk_size, remaining))
        chunklen = len(chunk)
        if chunklen == 0:
            return
        remaining -= chunklen
        yield chunk
:param table: The table to operate on
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/cherrypy/cherrypy/lib/__init__.py/file_generator_limited--crossover with--dataset/ETHPy150Open sdispater/orator/orator/schema/blueprint.py/Blueprint.__init__