def msgpack_encode(data_type, obj): return msgpack.dumps( msgpack_compat_obj_encode(data_type, obj), encoding='utf-8')