code: def _assert_expgrad_state(self, expgrad, data):
      n_predictors = len(expgrad.predictors_)
      assert expgrad.best_gap_ == pytest.approx(
          data["best_gap"], abs=_PRECISION
      )
      assert expgrad.best_gap_ < expgrad.nu
      assert expgrad.last_iter_ == data["last_iter"]
      assert expgrad.best_iter_ == data["best_iter"]
      assert expgrad.last_iter_ >= _MIN_ITER
      assert expgrad.n_oracle_calls_ == data["n_oracle_calls"]
      assert (
          expgrad.n_oracle_calls_dummy_returned_
          == data["n_oracle_calls_dummy_returned"]
      )
      assert n_predictors == data["n_predictors"]
      assert (
          len(expgrad.oracle_execution_times_)
          == expgrad.n_oracle_calls_
      )
  
imports: from copy import deepcopy
  import numpy
  import pandas
  import pytest
  from sklearn.dummy import DummyClassifier
  from sklearn.linear_model import LogisticRegression
  from fairlearn.reductions import AbsoluteLoss, BoundedGroupLoss, DemographicParity, EqualizedOdds, ErrorRate, ErrorRateParity, ExponentiatedGradient, FalsePositiveRateParity, SquareLoss, TruePositiveRateParity, ZeroOneLoss
  from fairlearn.reductions._exponentiated_gradient._constants import _MIN_ITER
  from fairlearn.reductions._moments.bounded_group_loss import MeanLoss
  from .simple_learners import LeastSquaresBinaryClassifierLearner, LeastSquaresRegressor
  from .test_utilities import _get_data
label_desc: Use image node_id 8 for calling the TestExponentiatedGradientSmoke obj's underlying member method code with example usage: obj._assert_expgrad_state(expgrad, data) without return types