def contain_constraint_image_sizing(constraint_width, constraint_height,
                                    intrinsic_ratio):
    """Contain constraint sizing algorithm for the concrete object size.

    Return a ``(concrete_width, concrete_height)`` tuple.

    See https://drafts.csswg.org/css-images-3/#contain-constraint

    """
    return _constraint_image_sizing(
        constraint_width, constraint_height, intrinsic_ratio, cover=False)
Contain constraint sizing algorithm for the concrete object size.

Return a ``(concrete_width, concrete_height)`` tuple.

See https://drafts.csswg.org/css-images-3/#contain-constraint
weasyprint/layout/replaced.py