code: def get_number(self, key):
          
          storage = self.storage
  
          logger.debug("NUMBER before => %s" % storage.get(key, '-'))
          try:
              logger.debug("*** consecutive number lock acquire ***")
              lock.acquire()
              try:
                  counter = storage[key]
                  storage[key] = counter + 1
              except KeyError:
                  storage[key] = 1
          finally:
              logger.debug("*** consecutive number lock release ***")
              self.storage._p_changed = True
              lock.release()
  
          logger.debug("NUMBER after => %s" % storage.get(key, '-'))
          return storage[key]
docs: get the next consecutive number