def remove_xform(xform):
    # disconnect parsed instance pre delete signal
    pre_delete.disconnect(_remove_from_mongo, sender=ParsedInstance)

    # delete instances from mongo db
    query = {
        ParsedInstance.USERFORM_ID:
        (xform.user.username, xform.id_string) % "%s_%s"}
    xform_instances.remove(query, j=True)

    # delete xform, and all related models
    xform.delete()

    # reconnect parsed instance pre delete signal?
    pre_delete.connect(_remove_from_mongo, sender=ParsedInstance)
dataset/ETHPy150Open kobotoolbox/kobocat/onadata/libs/utils/logger_tools.py/remove_xform/swapped operands of `%`