code: def __get_idxs(self, words):
          
          if self.bow:
              return list(itertools.chain.from_iterable(
                  [self.positions[z] for z in words]))
          else:
              return self.positions[words]
docs: Returns indexes to appropriate words.