def METHOD_NAME(self):
    data = {'type': self.type.value}
    if self.exc_string is not None:
        data['exc_string'] = b64encode(zlib.compress(self.exc_string.encode())).decode()
    try:
        serialized = self.serializer.dumps(self.return_value)
    except:  # noqa
        serialized = self.serializer.dumps(UNSERIALIZABLE_RETURN_VALUE_PAYLOAD)
    if self.return_value is not None:
        data['return_value'] = b64encode(serialized).decode()
    # return json.dumps(data)
    return data