parameters: (self, price)
return_statement: return result
docstring: :type price: int
          :rtype: int
docstring_summary: :type price: int
          :rtype: int
docstring_tokens: : type price : int : rtype : int
function: def next(self, price):
          """
          :type price: int
          :rtype: int
          """
          result = 1
          while self.__s and self.__s[-1][0] <= price:
              result += self.__s.pop()[1]
          self.__s.append([price, result])
          return result
function_tokens: def next ( self , price ) : result = 1 while self . __s and self . __s [ - 1 ] [ 0 ] <= price : result += self . __s . pop ( ) [ 1 ] self . __s . append ( [ price , result ] ) return result