

def get_font_sizes_dict(tree, styles_dict):
    font_sizes_dict = defaultdict(int)
    for p in tree.xpath('//w:p', namespaces=tree.nsmap):
        if is_natural_header(p, styles_dict):
            continue
        if _is_li(p):
            continue
        font_size = get_font_size(p, styles_dict)
        if (font_size is None):
            continue
        font_sizes_dict[font_size] += 1
    most_used_font_size = (- 1)
    highest_count = (- 1)
    for (size, count) in font_sizes_dict.items():
        if (count > highest_count):
            highest_count = count
            most_used_font_size = size
    result = {
        
    }
    for size in font_sizes_dict:
        if (font_size is None):
            continue
        if (int(size) > int(most_used_font_size)):
            result[size] = 'h2'
        else:
            result[size] = None
    return result

dataset/ETHPy150Open PolicyStat/docx2html/docx2html/core.py get_font_sizes_dict/VarMisuse@154/233 `size`->`font_size`