code: async def waitAccessAsync(self):
      
      async with self.lock:
        while True:
          last_access_ts = self.__getLastAccess()
          if last_access_ts is not None:
            now = time.time()
            last_access_ts = last_access_ts[0]
            time_since_last_access = now - last_access_ts
            if time_since_last_access < self.min_delay_between_accesses:
              time_to_wait = self.min_delay_between_accesses - time_since_last_access
              if self.jitter_range_ms is not None:
                time_to_wait += random.randint(*self.jitter_range_ms) / 1000
              self.logger.debug("Sleeping for %.2fms because of rate limit for domain %s" % (time_to_wait * 1000,
                                                                                             self.domain))
              await asyncio.sleep(time_to_wait)
  
          access_time = time.time()
          self.__access(access_time)
  
          # now we should be good... except if another process did the same query at the same time
          # the database serves as an atomic lock, query again to be sure the last row is the one
          # we just inserted
          last_access_ts = self.__getLastAccess()
          if last_access_ts[0] == access_time:
            break
docs: Wait the needed time before sending a request to honor rate limit.