from typing import Counter


def get_modes(empiric_distribution, at_least_total=10):
    """
    Get all values which are at least at_least_total
    times in the data.

    The most common value does not have to have at_least_total apearences in
    the data.

    Parameters
    ----------
    empiric_distribution : list
        List of integers
    at_least_total : int
    """
    modes = []
    s = sorted(Counter(empiric_distribution).items(),
               key=lambda n: n[1],
               reverse=True)
    total = float(len(s))
    for stroke_count, appearences in s:
        constrain1 = (stroke_count >= at_least_total and
                      appearences/total >= at_least_total)
        if constrain1 or len(modes) == 0:
            modes.append(stroke_count)
    return modes