<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_vector(self, vector):
 """\ Writes the provided vector to the matrix. `vector` An iterable of ``(word-id, word-frequency)`` tuples """

        self._num_docs+=1
        max_id, veclen = self._mmw.write_vector(self._num_docs, vector)
        self._num_terms = max(self._num_terms, 1 + max_id)
        self._num_nnz += veclen