@classmethod<EOL><INDENT>def encode(cls, value):<DEDENT>
try:<EOL><INDENT>coerced = bytes(value)<EOL>if coerced == value:<EOL><INDENT>return coerced<EOL><DEDENT><DEDENT>except (TypeError, UnicodeError):<EOL><INDENT>pass<EOL><DEDENT>raise InvalidValue('<STR_LIT>')<EOL>
write binary data into redis without encoding it.

:param value: bytes
:return: bytes