def METHOD_NAME(self, key):
    lock = self._redis_client.lock(
        key, timeout=self._health_check_ttl
    )
    try:
        is_locked = lock.acquire(blocking=False)
    except Exception as e:
        LOG.warn(e)
        raise RedisNotWorking(e)
    else:
        if is_locked:
            yield True
        else:
            raise KeyAlreadyLocked(
                "Key {} is already locked!".format(key)
            )
    finally:
        if 'is_locked' in locals() and is_locked:
            try:
                lock.release()
            except Exception as e:
                LOG.warn(e)
                error_message = "Error while releasing lock for key {}, wait for {}s.".format(
                    key, self._health_check_ttl
                )
                LOG.warn(error_message)