def deduplicate(hits):
    unique_names = set()
    unique_hits = []
    for hit in hits:
        if (not (hit['_source']['name'] in unique_names)):
            unique_hits.append(hit)
            unique_names.add(hit['_source']['name'])
    return unique_hits
def deduplicate(hits):
    unique_names = set()
    unique_hits = []
    for hit in hits:
        if (not (hit['_source']['name'] in unique_names)):
            unique_hits.append(hit)
            unique_names.add(hit['_source']['name'])
    return unique_hits