def METHOD_NAME(model, dataset):
    from river import utils
    assert isinstance(pickle.loads(pickle.dumps(model)), model.__class__)
    for x, y in dataset:
        if utils.inspect.isanomalydetector(model):
            model.score_one(x)
            model.learn_one(x)
        else:
            model.predict_one(x)
            model.learn_one(x, y)
    assert isinstance(pickle.loads(pickle.dumps(model)), model.__class__)