def reset(self, document, parent, level):
self.language = languages.get_language(<EOL>document.settings.language_code)<EOL>self.memo.document = document<EOL>self.memo.reporter = document.reporter<EOL>self.memo.language = self.language<EOL>self.memo.section_level = level<EOL>if self.memo.inliner is None:<EOL><INDENT>self.memo.inliner = Inliner()<EOL>self.memo.inliner.init_customizations(document.settings)<EOL><DEDENT>inliner = self.memo.inliner<EOL>inliner.reporter = document.reporter<EOL>inliner.document = document<EOL>inliner.language = self.language<EOL>inliner.parent = parent<EOL>self.document = document<EOL>self.reporter = self.memo.reporter<EOL>self.node = parent<EOL>self.state.runtime_init()<EOL>self.input_lines = document['<STR_LIT:source>']<EOL>
Reset the state of state machine.

        After reset, self and self.state can be used to
        passed to docutils.parsers.rst.Directive.run

        Parameters
        ----------
        document: docutils document
            Current document of the node.
        parent: parent node
            Parent node that will be used to interpret role and directives.
        level: int
            Current section level.