code: def consume(self, amount=1):
          
          # First, cleanup old stock
          current = self.leak()
  
          if current + amount > self.capacity:
              return False
  
          self._incr(amount)
          return True
docs: Consume one or more units from the bucket.