<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_text_record(self, witness):
 """Adds a Text record for `witness`. :param witness: witness to add a record for :type text: `WitnessText` """

        filename = witness.get_filename()
        name, siglum = witness.get_names()
        self._logger.info('Adding record for text {}'.format(filename))
        checksum = witness.get_checksum()
        token_count = len(witness.get_tokens())
        with self._conn:
            cursor = self._conn.execute(
                constants.INSERT_TEXT_SQL,
                [name, siglum, checksum, token_count, ''])
        return cursor.lastrowid