<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def keep_sources(self, keep):
 """Keep only the specified sources in the decomposition. """

        if self.unmixing_ is None or self.mixing_ is None:
            raise RuntimeError("No sources available (run do_mvarica first)")
        n_sources = self.mixing_.shape[0]
        self.remove_sources(np.setdiff1d(np.arange(n_sources), np.array(keep)))
        return self