def anonymous_table_boxes(box):
    """Remove and add boxes according to the table model.

    Take and return a ``Box`` object.

    See https://www.w3.org/TR/CSS21/tables.html#anonymous-boxes

    """
    if not isinstance(box, boxes.ParentBox) or box.is_running():
        return box

    # Do recursion.
    children = [anonymous_table_boxes(child) for child in box.children]
    return table_boxes_children(box, children)
Remove and add boxes according to the table model.

Take and return a ``Box`` object.

See https://www.w3.org/TR/CSS21/tables.html#anonymous-boxes
weasyprint/formatting_structure/build.py