def calc_multiplicity(mut_series, purity, cr_diff, c0):
    """Calculate multiplicity for the mutation"""
    mu_min_adj = (mut_series['mu_minor'] - c0) / cr_diff
    mu_maj_adj = (mut_series['mu_major'] - c0) / cr_diff

    # returns the multiplicity * CCF for this mutation
    return mut_series['VAF'] * (purity * (mu_min_adj + mu_maj_adj) + 2 * (1 - purity)) / purity