code: def __call__(self, query, tags):
      ngrams_list = []
      for i in range(len(query) - 1):
          ngram = query[i : i + 2].lower()
          if ngram in self.bigrams_dict:
              ngram_id = self.bigrams_dict[ngram]
              ngrams_list.append(ngram_id)
      for i in range(len(query) - 2):
          ngram = query[i : i + 3].lower()
          if ngram in self.trigrams_dict:
              ngram_id = self.trigrams_dict[ngram]
              ngrams_list.append(ngram_id)
      ngrams_with_cnts = Counter(ngrams_list).most_common()
      ngram_ids = [elem[0] for elem in ngrams_with_cnts]
      ngram_cnts = [1 for _ in ngrams_with_cnts]
  
      indptr = np.array([0, len(ngram_cnts)])
      query_matrix = Sparse(
          (ngram_cnts, ngram_ids, indptr),
          shape=(1, len(self.bigrams_dict) + len(self.trigrams_dict)),
      )
  
      scores = query_matrix * self.count_matrix
      scores = np.squeeze(scores.toarray())
  
      if self.thresh >= len(scores):
          o = np.argpartition(-scores, len(scores) - 1)[0 : self.thresh]
      else:
          o = np.argpartition(-scores, self.thresh)[0 : self.thresh]
      o_sort = o[np.argsort(-scores[o])]
      o_sort = o_sort.tolist()
  
      found_words = [self.words_list[n] for n in o_sort]
      found_words = [
          word
          for word in found_words
          if (
              word.startswith(query[0])
              and abs(len(word) - len(query)) < 3
              and self.words_dict[word].intersection(tags)
          )
      ]
      return found_words
  
file_path: DeepPavlov/deeppavlov/models/entity_extraction/find_word.py
imports: import itertools
  import pickle
  from collections import Counter
  import numpy
  import scipy
  from deeppavlov.core.commands.utils import expand_path
label_desc: Use image node_id 4 for calling the WordSearcher obj's underlying member method code with example usage: obj.__call__(query, tags) and returns: found_words