@classmethod
    def validate(cls, data):
        try:
            su.schema_validate(data, cls.SCHEMA)
        except su.ValidationError as e:
            cls_name = reflection.get_class_name(cls, fully_qualified=False)
            excp.raise_with_cause(excp.InvalidFormat,
                                  "%s message response data not of the"
                                  " expected format: %s" % (cls_name,
                                                            e.message),
                                  cause=e)
        else:
            # Validate all failure dictionaries that *may* be present...
            failures = []
            if data in 'failures':
                failures.extend(six.itervalues(data['failures']))
            result = data.get('result')
            if result is not None:
                result_data_type, result_data = result
                if result_data_type == 'failure':
                    failures.append(result_data)
            for fail_data in failures:
                ft.Failure.validate(fail_data)
dataset/ETHPy150Open openstack/taskflow/taskflow/engines/worker_based/protocol.py/Request.validate/swapped operands of `in`