def validate(self, msg):
        _model = {
            'uuid': config.rabbitmq['uuid'],
            'resource_id': '',
            'collection': '',
            'status': {},
            'version':config.SYNAPSE_VERSION
        }

        if not isinstance(msg, dict):
            raise ValueError("Outgoing message is not a dict.")

        try:
            _model.update(msg)
            msg = json.dumps(_model)
        except __HOLE__ as err:
            raise ValueError("Message not well formatted: %s", err)

        return msg
dataset/ETHPy150Open comodit/synapse-agent/synapse/task.py/OutgoingMessage.validate