def find_in_flow_baseline(box, last=False, baseline_types=(boxes.LineBox,)):
    """Return the absolute y position for the first (or last) in-flow baseline.

    If there’s no in-flow baseline, return None.

    """
    # TODO: synthetize baseline when needed.
    # See https://www.w3.org/TR/css-align-3/#synthesize-baseline.
    if isinstance(box, baseline_types):
        return box.position_y + box.baseline
    elif isinstance(box, boxes.TableCaptionBox):
        return
    children = reversed(box.children) if last else box.children
    for child in children:
        if child.is_in_normal_flow():
            result = find_in_flow_baseline(child, last, baseline_types)
            if result is not None:
                return result
Return the absolute y position for the first (or last) in-flow baseline.

If there’s no in-flow baseline, return None.
weasyprint/layout/table.py