(self, resource)
Checks if the resource is locked by any redlock instance.

        :param resource: The resource string name to check
        :returns: True if locked else False
Checks if the resource is locked by any redlock instance.
Checks if the resource is locked by any redlock instance .
async def is_locked(self, resource):
        """
        Checks if the resource is locked by any redlock instance.

        :param resource: The resource string name to check
        :returns: True if locked else False
        """

        with await self.connect() as redis:
            lock_identifier = await redis.get(resource)
        if lock_identifier:
            return True
        else:
            return False
async def is_locked ( self , resource ) : with await self . connect ( ) as redis : lock_identifier = await redis . get ( resource ) if lock_identifier : return True else : return False