original_docstring: Drip tokens into the bucket.
docstring: Drip tokens into the bucket.
docstring_tokens: Drip tokens into the bucket .
code: async def start(self):
          """Drip tokens into the bucket."""
          self.tokens = self.tokens_per_second
          while True:
              start = datetime.datetime.utcnow()
              await asyncio.sleep(self.refresh_time)
              end = datetime.datetime.utcnow()
              elapsed = (end - start).total_seconds()
              # There's no guarantee when the asyncio runtime will drop back into
              # this method after the sleep, so we must compute how long we were
              # asleep for and fill up with an appropriate number of tokens
              tokens_to_add = self.tokens_per_second * elapsed
              self.tokens = min(self.tokens + tokens_to_add, self.tokens_per_second)
code_tokens: async def start ( self ) : self . tokens = self . tokens_per_second while True : start = datetime . datetime . utcnow ( ) await asyncio . sleep ( self . refresh_time ) end = datetime . datetime . utcnow ( ) elapsed = ( end - start ) . total_seconds ( ) tokens_to_add = self . tokens_per_second * elapsed self . tokens = min ( self . tokens + tokens_to_add , self . tokens_per_second )
short_docstring: Drip tokens into the bucket.
short_docstring_tokens: Drip tokens into the bucket .
comment: """Drip tokens into the bucket."""$SEP$# There's no guarantee when the asyncio runtime will drop back into$SEP$# this method after the sleep, so we must compute how long we were$SEP$# asleep for and fill up with an appropriate number of tokens