<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _update_text_record(self, witness, text_id):
 """Updates the record with `text_id` with `witness`\'s checksum and token count. :param withness: witness to update from :type witness: `WitnessText` :param text_id: database ID of Text record :type text_id: `int` """

        checksum = witness.get_checksum()
        token_count = len(witness.get_tokens())
        with self._conn:
            self._conn.execute(constants.UPDATE_TEXT_SQL,
                               [checksum, token_count, text_id])