def validate_json_data(request):
    try:
        json = request.json_body
    except ValueError, e:
        request.errors.add('body', 'data', e.message)
        request.errors.status = 422
        return
    if not isinstance(json, dict) or json not in 'data' or not isinstance(json.get('data'), dict):
        request.errors.add('body', 'data', "Data not available")
        request.errors.status = 422
        return
    return json['data']
dataset/ETHPy150Open openprocurement/openprocurement.api/src/openprocurement/api/validation.py/validate_json_data/swapped operands of `not in`