def _get_toc_sections(
        self, section: SECSection, toc: HTMLDocument
    ) -> Tuple[Text, Text]:
        """Identifies section title and next section title in TOC under the given section heading."""
        # Note(yuming): The matching section and the section after the matching section
        # can be thought of as placeholders to look for matching content below the toc.
        section_toc = first(
            el for el in toc.elements if is_section_elem(section, el, self.filing_type)
        )
        if section_toc is None:
            # NOTE(yuming): unable to identify the section in TOC
            return (None, None)

        after_section_toc = toc.after_element(section_toc)
        next_section_toc = first(
            el
            for el in after_section_toc.elements
            if not is_section_elem(section, el, self.filing_type)
        )
        if next_section_toc is None:
            # NOTE(yuming): unable to identify the next section title in TOC,
            # will leads to failure in finding the end of the section
            return (section_toc, None)
        return (section_toc, next_section_toc)
Identifies section title and next section title in TOC under the given section heading.
llama-index-integrations/readers/llama-index-readers-sec-filings/llama_index/readers/sec_filings/prepline_sec_filings/sec_document.py