def calculateChangePointsSetPrior(changepointsSet):
    """
    Function that returns the prior probability of the changepoint set tau

    Args:
      changepointsSet : list<int>
        a list that contains the proposed changepoint set
    
    Returns: 
      res : float
        the prior probability of the changepointset
  """
    changepointsSetCopy = changepointsSet.copy()
    changepointsSetCopy.insert(0, 1)
    p = 0.125
    if len(changepointsSetCopy) > 10:
        res = 0
    else:
        tau_h = changepointsSetCopy[-1] - 1
        tau_h_minus = changepointsSetCopy[-2]
        el1 = (1 - p) ** (tau_h - tau_h_minus)
        el2 = 1
        for idx in range(len(changepointsSet) - 1):
            curTau_h = changepointsSetCopy[idx + 1]
            curTau_h_minus = changepointsSetCopy[idx]
            currEl2 = p * (1 - p) ** (curTau_h - curTau_h_minus - 1)
            el2 = el2 * currEl2
        res = el1 * el2
    return res
