def consume(self, tokens):
        """Consume tokens from the bucket. Returns True if there were
        sufficient tokens otherwise False."""
        if tokens <= self.tokens:
            self._tokens -= tokens
        else:
            return False
        return True
Consume tokens from the bucket. Returns True if there were
        sufficient tokens otherwise False.
recipes/Python/511490_Implementatitoken_bucket/recipe-511490.py