def vector_by_id(self, docpos):
        """
        Return indexed vector corresponding to the document at position `docpos`.
        """
        self.close_shard() # no-op if no documents added to index since last query
        pos = 0
        for shard in self.shards:
            pos += len(shard)
            if docpos < pos:
                break
        if not self.shards or docpos < 0 or docpos >= pos:
            raise ValueError("invalid document position: %s (must be 0 <= x < %s)" %
                             (docpos, len(self)))
        result = shard.get_document_id(pos + len(shard) - docpos)
        return result
dataset/ETHPy150Open largelymfs/topical_word_embeddings/TWE-1/gensim/similarities/docsim.py/Similarity.vector_by_id/swapped operands of `-`