def deserialize(self, b_str): mbuf = TMemoryBuffer(b_str) mbuf_protocol = TBinaryProtocol(mbuf) b = Bookmark() b.read(mbuf_protocol) return b