from typing import Protocol class SKLearnModel(Protocol): def fit(self, X, y, sample_weight=None): ... def predict(self, X): ... def score(self, X, y, sample_weight=None): ... def set_params(self, **params): ...