code: def acquire(self):
          
  
          acquired, locks = self._semaphore(keys=[self.name],
                                            args=[self.lock_id, self.max_locks,
                                                  self.timeout, time.time()])
  
          # Convert Lua boolean returns to Python booleans
          acquired = True if acquired == 1 else False
  
          return acquired, locks
docs: Obtain a semaphore lock.
  
          Returns: Tuple that contains True/False if the lock was acquired and number of
                   locks in semaphore.