def most_frequent(distrib: dict):
    """Helper to get the key that points at the highest value."""
    most_frequent = 0
    max_occur = 0
    for s in distrib:
        if distrib[s] > max_occur:
            most_frequent = s
            max_occur = distrib[s]
    return most_frequent
Helper to get the key that points at the highest value.
pdfsyntax/layout.py