def _split_into_chunks(self):
<EOL>chunks = []<EOL>chunk = None<EOL>bytes_lines_map = dict(self._bytes_lines())<EOL>block_stack = []<EOL>ignore_branch = <NUM_LIT:0><EOL>ult = penult = None<EOL>jump_to = set()<EOL>bytecodes = list(ByteCodes(self.code.co_code))<EOL>for bc in bytecodes:<EOL><INDENT>if bc.jump_to >= <NUM_LIT:0>:<EOL><INDENT>jump_to.add(bc.jump_to)<EOL><DEDENT><DEDENT>chunk_lineno = <NUM_LIT:0><EOL>for bc in bytecodes:<EOL><INDENT>start_new_chunk = False<EOL>first_chunk = False<EOL>if bc.offset in bytes_lines_map:<EOL><INDENT>start_new_chunk = True<EOL>chunk_lineno = bytes_lines_map[bc.offset]<EOL>first_chunk = True<EOL><DEDENT>elif bc.offset in jump_to:<EOL><INDENT>start_new_chunk = True<EOL><DEDENT>elif bc.op in OPS_CHUNK_BEGIN:<EOL><INDENT>start_new_chunk = True<EOL><DEDENT>if not chunk or start_new_chunk:<EOL><INDENT>if chunk:<EOL><INDENT>chunk.exits.add(bc.offset)<EOL><DEDENT>chunk = Chunk(bc.offset, chunk_lineno, first_chunk)<EOL>chunks.append(chunk)<EOL><DEDENT>if bc.jump_to >= <NUM_LIT:0> and bc.op not in OPS_NO_JUMP:<EOL><INDENT>if ignore_branch:<EOL><INDENT>ignore_branch -= <NUM_LIT:1><EOL><DEDENT>else:<EOL><INDENT>chunk.exits.add(bc.jump_to)<EOL><DEDENT><DEDENT>if bc.op in OPS_CODE_END:<EOL><INDENT>chunk.exits.add(-self.code.co_firstlineno)<EOL><DEDENT>if bc.op in OPS_PUSH_BLOCK:<EOL><INDENT>block_stack.append((bc.op, bc.jump_to))<EOL><DEDENT>if bc.op in OPS_POP_BLOCK:<EOL><INDENT>block_stack.pop()<EOL><DEDENT>if bc.op in OPS_CHUNK_END:<EOL><INDENT>if bc.op == OP_BREAK_LOOP:<EOL><INDENT>chunk.exits.add(block_stack[-<NUM_LIT:1>][<NUM_LIT:1>])<EOL><DEDENT>chunk = None<EOL><DEDENT>if bc.op == OP_END_FINALLY:<EOL><INDENT>for block in reversed(block_stack):<EOL><INDENT>if block[<NUM_LIT:0>] in OPS_EXCEPT_BLOCKS:<EOL><INDENT>chunk.exits.add(block[<NUM_LIT:1>])<EOL>break<EOL><DEDENT><DEDENT><DEDENT>if bc.op == OP_COMPARE_OP and bc.arg == COMPARE_EXCEPTION:<EOL><INDENT>ignore_branch += <NUM_LIT:1><EOL><DEDENT>penult = ult<EOL>ult = bc<EOL><DEDENT>if chunks:<EOL><INDENT>if ult and penult:<EOL><INDENT>if penult.op == OP_LOAD_CONST and ult.op == OP_RETURN_VALUE:<EOL><INDENT>if self.code.co_consts[penult.arg] is None:<EOL><INDENT>if chunks[-<NUM_LIT:1>].byte != penult.offset:<EOL><INDENT>ex = -self.code.co_firstlineno<EOL>last_chunk = chunks[-<NUM_LIT:1>]<EOL>last_chunk.exits.remove(ex)<EOL>last_chunk.exits.add(penult.offset)<EOL>chunk = Chunk(<EOL>penult.offset, last_chunk.line, False<EOL>)<EOL>chunk.exits.add(ex)<EOL>chunks.append(chunk)<EOL><DEDENT><DEDENT><DEDENT><DEDENT>chunks[-<NUM_LIT:1>].length = bc.next_offset - chunks[-<NUM_LIT:1>].byte <EOL>for i in range(len(chunks)-<NUM_LIT:1>):<EOL><INDENT>chunks[i].length = chunks[i+<NUM_LIT:1>].byte - chunks[i].byte<EOL><DEDENT><DEDENT>return chunks<EOL>
Split the code object into a list of `Chunk` objects.

        Each chunk is only entered at its first instruction, though there can
        be many exits from a chunk.

        Returns a list of `Chunk` objects.