<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def fit(self, sequences, y=None):
 """Fit a BACE lumping model using a sequence of cluster assignments. Parameters sequences : list(np.ndarray(dtype='int')) List of arrays of cluster assignments y : None Unused, present for sklearn compatibility only. Returns ------- self """

        super(BACE, self).fit(sequences, y=y)
        if self.n_macrostates is not None:
            self._do_lumping()
        else:
            raise RuntimeError('n_macrostates must not be None to fit')

        return self