def encodeMessage(self, events):

        message = proto_pb2.Msg(
            events=[self.encodeEvent(e) for e in events if e._type=='riemann']
        )

        return message.SerializeToString()
Encode a list of Tensor events with protobuf
dataset/ETHPy150Open calston/tensor/tensor/protocol/riemann.py/RiemannProtobufMixin.encodeMessage