def acquire(self):
        """
        Obtain a semaphore lock.

        Returns: Tuple that contains True/False if the lock was acquired and number of
                 locks in semaphore.
        """

        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
Obtain a semaphore lock.

        Returns: Tuple that contains True/False if the lock was acquired and number of
                 locks in semaphore.