

@classmethod
def validate_mode(cls, mode):
    if (mode not in [cls.ARCHIVE_MODE, cls.RESTORE_MODE]):
        raise Exception('mode should be archive or restore')
    return cls

dataset/ETHPy150Open dimagi/commcare-hq/corehq/apps/data_interfaces/interfaces.py FormManagementMode.validate_mode/VarMisuse@41/61 `mode`->`cls`