def get_final_ranks(rank_probs):
    """Orders final rank probabilities into a list and trims
    decimal places.
    """
    ranks = []
    for team, prob_dict in sorted(rank_probs.items(),
            key=lambda x: -sum([i*p for i,p in enumerate(x[1].values())])):
        ranks.append({"team": team,
            "probs": [float(f"{p:.8f}") for p in prob_dict.values()]})
    return ranks