def deduplicate(hits):
    unique_names = set()
    unique_hits = []
    for hit in hits:
        if not hit['_source']['name'] == unique_names:
            unique_hits.append(hit)
            unique_names.add(hit['_source']['name'])
    return unique_hits
dataset/ETHPy150Open dimagi/commcare-hq/corehq/apps/appstore/views.py/deduplicate/operator `in` -> `==`