def breakat(self, where: int) -> Tuple["FormattedText", "FormattedText"]:
        """Break the formatted text at the point given and return
        a new tuple of two FormattedText representing the before and
        after"""
        # FORMAT, TEXT, FORMAT, TEXT, FORMAT, TEXT
        # --before----, segF,   seg,  ----after--
        #
        # to
        #
        # FORMAT, TEXT, FORMAT, TEXTBEFORE, FORMAT, TEXTAFTER, FORMAT, TEXT
        # --before----, segF,   [before],   segF,   [after],   -----after--
        # ----index---------------/
        (index, split_point) = self.find_segment_place(where)
        text_segment = self.segments[index]
        before_text = text_segment[:split_point]
        after_text = text_segment[split_point:]
        before_segments = self.segments[:index]
        after_segments = self.segments[index + 1 :]

        formatting_for_segment = self.segments[index - 1]

        before_formatted_text = FormattedText()
        after_formatted_text = FormattedText()
        before_formatted_text.segments = before_segments + [before_text]
        after_formatted_text.segments = (
            [formatting_for_segment] + [after_text] + after_segments
        )
        before_formatted_text.plain_text = self.plain_text[:where]
        after_formatted_text.plain_text = self.plain_text[where:]

        return before_formatted_text, after_formatted_text
Break the formatted text at the point given and return
        a new tuple of two FormattedText representing the before and
        after
src/pathpicker/formatted_text.py