@classmethod
def encode(cls, value):
    """
        convert a boolean value into something we can persist to redis.
        An empty string is the representation for False.

        :param value: bool
        :return: bytes
        """
    return b'1' if cls.is_true(value) else b''
