'Create a new StateMachine rooted at `node` and run it over the input
`block`.'

def nested_parse(self, block, input_offset, node, match_titles=0, state_machine_class=None, state_machine_kwargs=None):

    if (state_machine_class is None):
        state_machine_class = self.nested_sm
    if (state_machine_kwargs is None):
        state_machine_kwargs = self.nested_sm_kwargs
    block_length = len(block)
    state_machine = state_machine_class(debug=self.debug, **state_machine_kwargs)
    state_machine.run(block, input_offset, memo=self.memo, node=node, match_titles=match_titles)
    state_machine.unlink()
    new_offset = state_machine.abs_line_offset()
    if (block.parent and ((len(block) - block_length) != 0)):
        self.state_machine.next_line((len(block) - block_length))
    return new_offset
