<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _array_setitem_with_key_seq(self, array_name, index, key_seq, value):
 """ Sets a the array value in the TOML file located by the given key sequence. Example: self._array_setitem(array_name, index, ('key1', 'key2', 'key3'), 'text_value') is equivalent to doing self.array(array_name)[index]['key1']['key2']['key3'] = 'text_value' """

        table = self.array(array_name)[index]
        key_so_far = tuple()
        for key in key_seq[:-1]:
            key_so_far += (key,)
            new_table = self._array_make_sure_table_exists(array_name, index, key_so_far)
            if new_table is not None:
                table = new_table
            else:
                table = table[key]
        table[key_seq[-1]] = value