code: def _convert_query(self, query):
          
          query = self.dictionary.doc2bow(self._tokenize_latex(query))
          sims = self.index[query]
          neighbors = sorted(sims, key=lambda item: -item[1])
          neighbors = {"neighbors":[{self.columns[0]: {"data": self.docs[n[0]], "fmt": "math"}, self.columns[1]: {"data": float(n[1])}} for n in neighbors]} if neighbors else {"neighbors": []}
          return neighbors
docs: Convert query into an indexable string.