def border_image_width(style, name, values):
    """Compute the ``border-image-width`` property."""
    computed_values = []
    for value in values:
        if value == 'auto':
            computed_values.append(value)
        else:
            number, unit = value
            computed_values.append(number if unit is None else value)
    if len(computed_values) == 1:
        computed_values *= 4
    elif len(computed_values) == 2:
        computed_values *= 2
    elif len(computed_values) == 3:
        computed_values.append(computed_values[1])
    return tuple(computed_values)
Compute the ``border-image-width`` property.
weasyprint/css/computed_values.py