def get_top_reactions(reactions, threshold):
    """
    We get all the posts with reactions above a threshold.
    If there are > 5 posts, we take those 5.
    Any more than 9 posts, we take the top 9.
    :param reactions: List of reactions for each post.
    :param threshold: The minimum number of reactions for the post to be considered for the booster pack.
    :return: The sorted and filtered list of reactions above the threshold.
    """
    reactions.sort(key=lambda x: x['total'], reverse=True)
    print('Sorted total high to low: ', end=" ")
    print(reactions)

    reactions = list(filter(lambda item: item['total'] >= threshold, reactions))
    print(f'Posts above threshold of {threshold}:', end=" ")
    print(reactions)

    return reactions