<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_coef_indices(self, i=-1):
 """get the indices for the coefficients of a term in the term list Parameters --------- i : int by default `int=-1`, meaning that coefficient indices are returned for all terms in the term list Returns ------- list of integers """

        if i == -1:
            return list(range(self.n_coefs))

        if i >= len(self._terms):
            raise ValueError('requested {}th term, but found only {} terms'\
                            .format(i, len(self._terms)))

        start = 0
        for term in self._terms[:i]:
            start += term.n_coefs
        stop = start + self._terms[i].n_coefs
        return list(range(start, stop))