import math


def get_email_recency_rank_score(mid_rank_dic, mid, beta):
    """
    Compute the recency score for a given mid
    """
    mid_rank = mid_rank_dic[mid]
    recency_score = math.exp(- mid_rank / beta)
    return recency_score