def top_N(self, query_item, labels, N, distance_metric='jaccard', threshold = 0.1):

            # Run the similarity query, get the match list, sort it, look
            # up the labels for those indices and return that data + sim score
            matches = self.similarity_query(query_item, distance_metric, threshold)
            matches.sort(reverse=True)
            matches_data = []
            for sim, index in matches[:N]:
                matches_data.append({'sim':sim, 'label':labels[index]})

            # Return the matches labels
            return matches_data
Converts an ASCII representation of a protocol message into a message.
dataset/ETHPy150Open ClickSecurity/data_hacking/data_hacking/lsh_sims/lsh_sims.py/LSHSimilarities.top_N--crossover with--dataset/ETHPy150Open sklearn-theano/sklearn-theano/sklearn_theano/externals/google/protobuf/text_format.py/_ParseOrMerge