def METHOD_NAME(
    acc: accum_type, item: PDQIndexMatch
) -> accum_type:
    acc[item.similarity_info.distance] = acc.get(
        item.similarity_info.distance, set()
    )
    # Instead of storing the unhashable item.metadata dict, store its
    # hash so we can compare using self.assertSetEqual
    acc[item.similarity_info.distance].add(hash(frozenset(item.metadata)))
    return acc