def _align_to_newline(self):
        "Aligns the file object's position to the next newline."
        fo, bsize = self._file_obj, self._blocksize
        cur, total_read = '', 0
        cur_pos = fo.tell()
        while '\n' not in cur:
            cur = fo.read(bsize)
            total_read += bsize
        try:
            newline_offset = cur.index('\n') + total_read - bsize
        except __HOLE__:
            raise  # TODO: seek to end?
        fo.seek(cur_pos + newline_offset)
dataset/ETHPy150Open mahmoud/boltons/boltons/jsonutils.py/JSONLIterator._align_to_newline