    def copy_with_text(self, text):
        """Return a new TextBox identical to this one except for the text."""
        assert text
        new_box = self.copy()
        new_box.text = text
        return new_box
Return a new TextBox identical to this one except for the text.
weasyprint/formatting_structure/boxes.py