def load_chunk(filename, bounds, encoding='utf8', slow=False):
    if slow:
        return _load_chunk_slow(filename, bounds, encoding)

    with open(filename, 'rb') as f:
        f.seek(bounds.byte_start)
        size = bounds.byte_end - bounds.byte_start
        return f.read(size).decode(encoding)
Load a chunk from file using Bounds info.
dataset/ETHPy150Open kmike/opencorpora-tools/opencorpora/xml_utils.py/load_chunk