<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def vec_by_id(self, docid):
 """Return indexed vector corresponding to document `docid`."""

        pos = self.id2pos[docid]
        return self.qindex.vector_by_id(pos)