def typical_font_size(text_blocks: list) -> float:
    """Find the most frequent font size."""
    distrib = {}
    for x in text_blocks:
        scaling = x['scaling']
        nb_char = len(x['text'])
        if scaling not in distrib:
            distrib[scaling] = 0
        distrib[scaling] += nb_char
    return most_frequent(distrib)
Find the most frequent font size.
pdfsyntax/layout.py