def insert(self, key, minhash):
        '''
        Insert a unique `key` to the index, together
        with a `minhash` of the data referenced by the `key`.
        '''
        if len(minhash) != self.h:
            raise ValueError("Expecting minhash with length %d, got %d"
                    % (self.h, len(minhash)))
        if key in self.keys:
            raise ValueError("The given key already exists")
        self.keys[key] = [self._H(minhash.hashvalues[start:end]) 
                for start, end in self.hashranges]
        for H, hashtable in zip(self.keys[key], self.hashtables):
            if H not in hashtable:
                hashtable[H] = []
            hashtable[H].append(key)
dataset/ETHPy150Open ekzhu/datasketch/datasketch/lsh.py/MinHashLSH.insert/original