def _prepare_pyshell_blocks(self, text):
if "<STR_LIT>" not in text:<EOL><INDENT>return text<EOL><DEDENT>less_than_tab = self.tab_width - <NUM_LIT:1><EOL>_pyshell_block_re = re.compile(r"""<STR_LIT>""" % less_than_tab, re.M | re.X)<EOL>return _pyshell_block_re.sub(self._pyshell_block_sub, text)<EOL>
Ensure that Python interactive shell sessions are put in
        code blocks -- even if not properly indented.