import math


def do_tfidf_stops(tf_dct: dict):
    """
    from the tfi_final dict (word:avg tfidf score), create stop list from words with
    tfidf value below the average for all words.
    :param tf_dct:
    :return:
    """
    tfiavg = math.fsum(tf_dct.values()) / len(tf_dct)

    tfi_stops: list = []
    for k, v in tf_dct.items():
        if v < tfiavg:
            tfi_stops.append(k)
    return tfi_stops