def handle_colgroup(element, box, _get_image_from_uri, _base_url):
    """Handle the ``span`` attribute."""
    if isinstance(box, boxes.TableColumnGroupBox):
        if not any(child.tag == 'col' for child in element):
            box.children = [
                boxes.TableColumnBox.anonymous_from(box, [])
                for _ in range(box.span)]
    return [box]
Handle the ``span`` attribute.
weasyprint/html.py