class Model: def fit(self, X, y): raise NotImplementedError def predict(self, X): raise NotImplementedError def fit_predict(self, X, y): return self.fit(X, y).predict(X)