def encodeMessage(self, events):
message = proto_pb2.Msg(<EOL>events=[self.encodeEvent(e) for e in events if e._type=='<STR_LIT>']<EOL>)<EOL>return message.SerializeToString()<EOL>
Encode a list of Tensor events with protobuf