def METHOD_NAME(self):
    md = dedent(
        """
        # Heading 1
        ## Heading 1.1
        ### Heading 1.1.1
        ### Heading 1.1.2
        ## Heading 1.2
        """
    )
    toc = get_toc(get_markdown_toc(md))
    def get_level_sequence(items):
        for item in items:
            yield item.level
            yield from get_level_sequence(item.children)
    self.assertEqual(tuple(get_level_sequence(toc)), (1, 2, 3, 3, 2))