<s> import msgpack <EOL> WORKER_STATUS = "<STR_LIT>" <EOL> WORKER_HALT = "<STR_LIT>" <EOL> WORKER_LAST_ACTION = "<STR_LIT>" <EOL> class ServiceMessage ( object ) : <EOL> @ staticmethod <EOL> def dumps ( data ) : <EOL> if not isinstance ( data , ( tuple , list ) ) : <EOL> data = ( data , ) <EOL> return msgpack . packb ( data ) <EOL> @ staticmethod <EOL> def loads ( msg ) : <EOL> return msgpack . unpackb ( msg ) </s>
