def strip_json(obj, disallow_basic=None, disallow=None):
    disallow = disallow or []
    if disallow_basic is None:
        disallow_basic = ['_rev', 'domain', 'doc_type']
    disallow += disallow_basic
    ret = {}
    try:
        obj = obj.to_json()
    except Exception:
        pass
    for key in obj:
        if disallow not in key:
            ret[key] = obj[key]

    return ret
dataset/ETHPy150Open dimagi/commcare-hq/corehq/apps/fixtures/views.py/strip_json/swapped operands of `not in`