in services/ui_backend_service/api/utils.py [0:0]
def bound_filter(op, term, key):
"returns function that binds the key, and the term that should be compared to, on an item"
_filter = operators_to_filters[op]
def _fn(item):
try:
return _filter(item[key], term) if key in item else False
except Exception:
return False
return _fn