async def _replace(self, key: Text, data: Dict[Text, Any]) -> None:
        """
        Replace the register with a new value.
        """

        with await self.pool as r:
            await r.set(self.register_key(key), ujson.dumps(data))
async def _replace ( self , key : Text , data : Dict [ Text , Any ] ) -> None : with await self . pool as r : await r . set ( self . register_key ( key ) , ujson . dumps ( data ) )
Replace the register with a new value.