'Attempt to acquire the lock.
If the lock is successfully acquired, this method returns a context
manager that will automatically release the lock when exited. If the
lock cannot be acquired, an ``UnableToAcquireLock`` error will be
raised.'

def acquire(self):

    try:
        self.backend.acquire(self.key, self.duration, self.routing_key)
    except Exception as error:
        six.raise_from(UnableToAcquireLock('Unable    to    acquire    {!r}    due    to    error:    {}'.format(self, error)), error)
    @contextmanager
    def releaser():
        try:
            (yield)
        finally:
            self.release()
    return releaser()
