def expand_page_break_inside(tokens, name):
    """Expand the legacy ``page-break-inside`` property.

    See https://www.w3.org/TR/css-break-3/#page-break-properties

    """
    keyword = get_single_keyword(tokens)
    if keyword in ('auto', 'avoid'):
        yield 'break-inside', tokens
    else:
        raise InvalidValues
Expand the legacy ``page-break-inside`` property.

See https://www.w3.org/TR/css-break-3/#page-break-properties
weasyprint/css/validation/expanders.py