    def copy_with_children(self, new_children):
        """Create a new equivalent box with given ``new_children``."""
        new_box = self.copy()
        new_box.children = new_children

        # Clear and reset removed decorations as we don't want to keep the
        # previous data, for example when a box is split between two pages.
        self.remove_decoration_sides = set()

        return new_box
Create a new equivalent box with given ``new_children``.
weasyprint/formatting_structure/boxes.py