<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def list_set(self, key, index, value, **kwargs):
 """ Sets an item within a list at a given position. :param key: The key of the document :param index: The position to replace :param value: The value to be inserted :param kwargs: Additional arguments to :meth:`mutate_in` :return: :class:`OperationResult` :raise: :cb_exc:`NotFoundError` if the list does not exist :raise: :exc:`IndexError` if the index is out of bounds example:: cb.upsert('a_list', ['hello', 'world']) cb.list_set('a_list', 1, 'good') cb.get('a_list').value # => ['hello', 'good'] .. seealso:: :meth:`map_add`, :meth:`list_append` """

        op = SD.replace('[{0}]'.format(index), value)
        sdres = self.mutate_in(key, op, **kwargs)
        return self._wrap_dsop(sdres)