def get_section_narrative(self, section: SECSection) -> List[NarrativeText]:
        """Identifies narrative text sections that fall under the given section heading."""
        _raise_for_invalid_filing_type(self.filing_type)
        # NOTE(robinson) - We are not skipping table text because the risk narrative section
        # usually does not contain any tables and sometimes tables are used for
        # title formatting
        toc = self.get_table_of_contents()
        if not toc.pages:
            return self.get_section_narrative_no_toc(section)

        # Note(yuming): section_toc is the section title in TOC,
        # next_section_toc is the section title right after section_toc in TOC
        section_toc, next_section_toc = self._get_toc_sections(section, toc)
        if section_toc is None:
            # NOTE(yuming): fail to find the section title in TOC
            return []

        # NOTE(yuming): we use doc after next_section_toc instead of after toc
        # to workaround an issue where the TOC grabbed too many elements by
        # starting to parse after the section matched in the TOC
        doc_after_section_toc = self.after_element(
            next_section_toc if next_section_toc else section_toc
        )
        # NOTE(yuming): map section_toc to the section title after TOC
        # to find the start of the section
        section_start_element = get_element_by_title(
            reversed(doc_after_section_toc.elements), section_toc.text, self.filing_type
        )
        if section_start_element is None:
            return []
        doc_after_section_heading = self.after_element(section_start_element)

        # NOTE(yuming): Checks if section_toc is the last section in toc based on
        # the structure of the report filings or fails to find the section title in TOC.
        # returns everything up to the next Title element
        # to avoid the worst case of returning the entire doc.
        if self._is_last_section_in_report(section, toc) or next_section_toc is None:
            # returns everything after section_start_element in doc
            return get_narrative_texts(doc_after_section_heading, up_to_next_title=True)

        # NOTE(yuming): map next_section_toc to the section title after TOC
        # to find the start of the next section, which is also the end of the section we want
        section_end_element = get_element_by_title(
            doc_after_section_heading.elements, next_section_toc.text, self.filing_type
        )

        if section_end_element is None:
            # NOTE(yuming): returns everything up to the next Title element
            # to avoid the worst case of returning the entire doc.
            return get_narrative_texts(doc_after_section_heading, up_to_next_title=True)

        return get_narrative_texts(
            doc_after_section_heading.before_element(section_end_element)
        )
Identifies narrative text sections that fall 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