code: async def acquire(self, blocking=None, blocking_timeout=None):
          
          sleep = self.sleep
          token = b(uuid.uuid1().hex)
          if blocking is None:
              blocking = self.blocking
          if blocking_timeout is None:
              blocking_timeout = self.blocking_timeout
          blocking_timeout = blocking_timeout or self.timeout
          stop_trying_at = mod_time.time() + min(blocking_timeout, self.timeout)
  
          while True:
              if await self.do_acquire(token):
                  lock_acquired_at = mod_time.time()
                  if await self.check_lock_in_slaves(token):
                      check_finished_at = mod_time.time()
                      # if time expends on acquiring lock is greater than given time
                      # the lock should be released manually
                      if check_finished_at > stop_trying_at:
                          await self.do_release(token)
                          return False
                      self.local.token = token
                      # validity time is considered to be the
                      # initial validity time minus the time elapsed during check
                      await self.do_extend(lock_acquired_at - check_finished_at)
                      return True
                  else:
                      await self.do_release(token)
                      return False
              if not blocking or mod_time.time() > stop_trying_at:
                  return False
              await asyncio.sleep(sleep, loop=self.redis.connection_pool.loop)
docs: Use Redis to hold a shared, distributed lock named ``name``.
          Returns True once the lock is acquired.
  
          If ``blocking`` is False, always return immediately. If the lock
          was acquired, return True, otherwise return False.
  
          ``blocking_timeout`` specifies the maximum number of seconds to
          wait trying to acquire the lock. It should not be greater than
          expire time of the lock