def __init__(
        self,
        headers_to_split_on: list[Tuple[str, str]],
        return_each_element: bool = False,
    ):
        """Create a new HTMLHeaderTextSplitter.

        Args:
            headers_to_split_on: list of tuples of headers we want to track
            mapped to (arbitrary) keys for metadata. Allowed header values:
            h1, h2, h3, h4, h5, h6
            e.g. [("h1", "Header 1"), ("h2", "Header 2)].
            return_each_element: Return each element w/ associated headers.
        """
        # Output element-by-element or aggregated into chunks w/ common headers
        self.return_each_element = return_each_element
        self.headers_to_split_on = sorted(headers_to_split_on)
Create a new HTMLHeaderTextSplitter.

        Args:
            headers_to_split_on: list of tuples of headers we want to track
            mapped to (arbitrary) keys for metadata. Allowed header values:
            h1, h2, h3, h4, h5, h6
            e.g. [("h1", "Header 1"), ("h2", "Header 2)].
            return_each_element: Return each element w/ associated headers.
        
py/shared/utils/splitter/text.py