@classmethod<EOL><INDENT>def encode(cls, value):<DEDENT>
if value not in [True, False]:<EOL><INDENT>raise InvalidValue('<STR_LIT>')<EOL><DEDENT>return b'<STR_LIT:1>' if value else b'<STR_LIT>'<EOL>
convert a boolean value into something we can persist to redis.
An empty string is the representation for False.

:param value: bool
:return: bytes