code: def calcProbOfVFromW(self, V, W):
          
  
          weights = range(0, len(V))
          i = 0
          for alt in W:
              weights[alt-1] = self.phi ** i
              i = i + 1
          
          # Calculate the probability that we draw V[0], V[1], and so on from W.
          prob = 1.0
          totalWeight = sum(weights)
          for alt in V:
              prob = prob * weights[alt-1]/totalWeight
              totalWeight = totalWeight - weights[alt-1]
      
          return prob
docs: Given a order vector V and an order vector W, calculate the probability that we generate
          V as our next sample if our current sample was W.
  
          :ivar list<int> V: Contains integer representations of each candidate in order of their
              ranking in a vote, from first to last.
          :ivar list<int> W: Contains integer representations of each candidate in order of their
              ranking in a vote, from first to last.