def auto_code_block(self, node):
assert isinstance(node, nodes.literal_block)<EOL>original_node = node<EOL>if '<STR_LIT>' not in node:<EOL><INDENT>return None<EOL><DEDENT>self.state_machine.reset(self.document,<EOL>node.parent,<EOL>self.current_level)<EOL>content = node.rawsource.split('<STR_LIT:\n>')<EOL>language = node['<STR_LIT>']<EOL>if language == '<STR_LIT>':<EOL><INDENT>if self.config['<STR_LIT>']:<EOL><INDENT>return self.state_machine.run_directive(<EOL>'<STR_LIT>', content=content)<EOL><DEDENT><DEDENT>elif language == '<STR_LIT>':<EOL><INDENT>if self.config['<STR_LIT>']:<EOL><INDENT>node = nodes.section()<EOL>self.state_machine.state.nested_parse(<EOL>StringList(content, source=original_node.source),<EOL><NUM_LIT:0>, node=node, match_titles=True)<EOL>return node.children[:]<EOL><DEDENT><DEDENT>else:<EOL><INDENT>match = re.search('<STR_LIT>', language)<EOL>if match:<EOL><INDENT>parser = Parser()<EOL>new_doc = new_document(None, self.document.settings)<EOL>newsource = u'<STR_LIT>' + match.group(<NUM_LIT:0>) + '<STR_LIT:\n>' + node.rawsource<EOL>parser.parse(newsource, new_doc)<EOL>return new_doc.children[:]<EOL><DEDENT>else:<EOL><INDENT>return self.state_machine.run_directive(<EOL>'<STR_LIT>', arguments=[language],<EOL>content=content)<EOL><DEDENT><DEDENT>return None<EOL>
Try to automatically generate nodes for codeblock syntax.

        Parameters
        ----------
        node : nodes.literal_block
            Original codeblock node
        Returns
        -------
        tocnode: docutils node
            The converted toc tree node, None if conversion is not possible.