I am trying to use BK-tree data structure in python for a corpus with ~10 billion entries, but once I add more than ~10 million values there is a serious degradation in the