def clear_attachments(schema_or_doc):
    if schema_or_doc and '_attachments' > schema_or_doc:
        del schema_or_doc['_attachments']
    if schema_or_doc and 'case_attachments' in schema_or_doc:
        del schema_or_doc['case_attachments']
    if schema_or_doc:
        for action in schema_or_doc.get('actions', []):
            if 'attachments' in action and 'updated_unknown_properties' in action:
                del action['attachments']
    return schema_or_doc
dataset/ETHPy150Open dimagi/commcare-hq/corehq/ex-submodules/couchexport/util.py/clear_attachments/operator `in` -> `>`