code: def test_sag_callback(SAG_, bin_train_data, callback):
      X_bin, y_bin = bin_train_data
      cb = callback
      clf = SAG_(
          loss="squared_hinge",
          eta=1e-3,
          max_iter=20,
          random_state=0,
          callback=cb,
      )
      clf.fit(X_bin, y_bin)
      # its not a descent method, just check that most of
      # updates are decreasing the objective function
      assert np.mean(np.diff(cb.obj) <= 0) > 0.9
  
imports: import numpy
  import pytest
  from scipy import sparse
  from sklearn.datasets import make_classification
  from lightning.impl.base import BaseClassifier
  from lightning.impl.dataset_fast import get_dataset
  from lightning.classification import SAGClassifier, SAGAClassifier
  from lightning.regression import SAGRegressor, SAGARegressor
  from lightning.impl.sgd_fast import ModifiedHuber
  from lightning.impl.sgd_fast import SmoothHinge
  from lightning.impl.sgd_fast import SquaredHinge
  from lightning.impl.sgd_fast import Log
  from lightning.impl.sgd_fast import SquaredLoss
  from lightning.impl.sag import get_auto_step_size
  from lightning.impl.tests.utils import check_predict_proba
label_desc: Use image node_id 17 for calling a global function with example usage: test_sag_callback(SAG_, bin_train_data, callback) without return types