parameters: (self, n, primes)
return_statement: return ugly_number
docstring: :type n: int
          :type primes: List[int]
          :rtype: int
docstring_summary: :type n: int
          :type primes: List[int]
          :rtype: int
docstring_tokens: : type n : int : type primes : List [ int ] : rtype : int
function: def nthSuperUglyNumber(self, n, primes):
          """
          :type n: int
          :type primes: List[int]
          :rtype: int
          """
          ugly_number = 0
  
          heap = []
          heapq.heappush(heap, 1)
          for p in primes:
              heapq.heappush(heap, p)
          for _ in xrange(n):
              ugly_number = heapq.heappop(heap)
              for i in xrange(len(primes)):
                  if ugly_number % primes[i] == 0:
                      for j in xrange(i + 1):
                          heapq.heappush(heap, ugly_number * primes[j])
                      break
  
          return ugly_number
function_tokens: def nthSuperUglyNumber ( self , n , primes ) : ugly_number = 0 heap = [ ] heapq . heappush ( heap , 1 ) for p in primes : heapq . heappush ( heap , p ) for _ in xrange ( n ) : ugly_number = heapq . heappop ( heap ) for i in xrange ( len ( primes ) ) : if ugly_number % primes [ i ] == 0 : for j in xrange ( i + 1 ) : heapq . heappush ( heap , ugly_number * primes [ j ] ) break return ugly_number