code: def test_1259():
      """
  
      https://github.com/online-ml/river/issues/1259
  
      >>> from river import bandit
      >>> from river import datasets
      >>> from river import evaluate
      >>> from river import linear_model
      >>> from river import metrics
      >>> from river import model_selection
      >>> from river import optim
      >>> from river import preprocessing
  
      >>> models = [
      ...     linear_model.LogisticRegression(optimizer=optim.SGD(lr=lr))
      ...     for lr in [0.0001, 0.001, 1e-05, 0.01]
      ... ]
  
      >>> dataset = datasets.Phishing()
      >>> model = (
      ...     preprocessing.StandardScaler() |
      ...     model_selection.BanditClassifier(
      ...         models,
      ...         metric=metrics.Accuracy(),
      ...         policy=bandit.Exp3(
      ...             gamma=0.5,
      ...             seed=42
      ...         )
      ...     )
      ... )
      >>> metric = metrics.Accuracy()
  
      >>> evaluate.progressive_val_score(dataset, model, metric)
      Accuracy: 87.20%
  
      """
  
file_path: river/river/model_selection/test_bandit.py
imports: from __future__ import annotations
  import importlib
  import inspect
  import pytest
  from river import bandit, datasets, evaluate, linear_model, metrics, model_selection, optim, preprocessing
label_desc: Use image node_id 1 for calling a global function with example usage: test_1259() without return types