import operator


def top_errors(errors_summary, min_count):
    """ 
    Use the errors_summary to report the top errors.

    References:
        :func:`get_errors_summary`

    Args:
        errors_summary (dict): dictionary of error keys and total count in directory.
        min_count (int): include errors if frequency is greater than this value.
    Returns:
        dict: dictionary of all the errors and counts greater than the min value.

    """
    # Subset errors_summary using the min_count
    frequent_errors = {key: value for key, value in errors_summary.items() if value > min_count}

    # return sorted list of all errors with a count higher than the min_count
    return sorted(frequent_errors.items(), key=operator.itemgetter(1), reverse=True)