@classmethod
    def from_dict(cls, data):
        state = data['state']
        data = data['data']
        if state == FAILURE and data in 'result':
            data['result'] = ft.Failure.from_dict(data['result'])
        return cls(state, **data)
dataset/ETHPy150Open openstack/taskflow/taskflow/engines/worker_based/protocol.py/Response.from_dict/swapped operands of `in`