code: def consume(self, key, amount=1, rate=None, capacity=None, **kwargs):
          
          bucket = self.get_bucket(key, rate, capacity, **kwargs)
          return bucket.consume(amount)
docs: Consume an amount for a given key.
  
          Non-default rate/capacity can be given to override Throttler defaults.
  
          Returns:
              bool: whether the units could be consumed