code: def iterative_fit(self, X, y, n_iter=2, refit=False):
      import sklearn.preprocessing
      from sklearn.linear_model import SGDRegressor
  
      # Need to fit at least two iterations, otherwise early stopping will not
      # work because we cannot determine whether the algorithm actually
      # converged. The only way of finding this out is if the sgd spends less
      # iterations than max_iter. If max_iter == 1, it has to spend at least
      # one iteration and will always spend at least one iteration, so we
      # cannot know about convergence.
      n_iter = max(n_iter, 2)
  
      if refit:
          self.estimator = None
          self.scaler = None
  
      if self.estimator is None:
          self.fully_fit_ = False
  
          self.alpha = float(self.alpha)
          self.l1_ratio = (
              float(self.l1_ratio)
              if self.l1_ratio is not None
              else 0.15
          )
          self.epsilon = (
              float(self.epsilon) if self.epsilon is not None else 0.1
          )
          self.eta0 = float(self.eta0)
          self.power_t = (
              float(self.power_t) if self.power_t is not None else 0.25
          )
          self.average = check_for_bool(self.average)
          self.fit_intercept = check_for_bool(self.fit_intercept)
          self.tol = float(self.tol)
  
          self.estimator = SGDRegressor(
              loss=self.loss,
              penalty=self.penalty,
              alpha=self.alpha,
              fit_intercept=self.fit_intercept,
              max_iter=n_iter,
              tol=self.tol,
              learning_rate=self.learning_rate,
              l1_ratio=self.l1_ratio,
              epsilon=self.epsilon,
              eta0=self.eta0,
              power_t=self.power_t,
              shuffle=True,
              average=self.average,
              random_state=self.random_state,
              warm_start=True,
          )
  
          self.scaler = sklearn.preprocessing.StandardScaler(copy=True)
  
          if y.ndim == 1:
              y = y.reshape((-1, 1))
  
          y_scaled = self.scaler.fit_transform(y)
  
          # Flatten: [[0], [0], [0]] -> [0, 0, 0]
          if y_scaled.ndim == 2 and y_scaled.shape[1] == 1:
              y_scaled = y_scaled.flatten()
  
          self.estimator.fit(X, y_scaled)
          self.n_iter_ = self.estimator.n_iter_
      else:
          self.estimator.max_iter += n_iter
          self.estimator.max_iter = min(
              self.estimator.max_iter, self.max_iter
          )
  
          # Convert y to be at least 2d for the scaler
          # [1,1,1] -> [[1], [1], [1]]
          if y.ndim == 1:
              y = y.reshape((-1, 1))
  
          y_scaled = self.scaler.transform(y)
  
          # Flatten: [[0], [0], [0]] -> [0, 0, 0]
          if y_scaled.ndim == 2 and y_scaled.shape[1] == 1:
              y_scaled = y_scaled.flatten()
  
          self.estimator._validate_params()
          self.estimator._partial_fit(
              X,
              y_scaled,
              alpha=self.estimator.alpha,
              C=1.0,
              loss=self.estimator.loss,
              learning_rate=self.estimator.learning_rate,
              max_iter=n_iter,
              sample_weight=None,
              coef_init=None,
              intercept_init=None,
          )
          self.n_iter_ += self.estimator.n_iter_
  
      if (
          self.estimator.max_iter >= self.max_iter
          or self.estimator.max_iter > self.n_iter_
      ):
          self.fully_fit_ = True
  
      return self
  
file_path: auto-sklearn/autosklearn/pipeline/components/regression/sgd.py
imports: from typing import Optional
  from ConfigSpace.conditions import EqualsCondition, InCondition
  from ConfigSpace.configuration_space import ConfigurationSpace
  from ConfigSpace.hyperparameters import CategoricalHyperparameter, UniformFloatHyperparameter, UnParametrizedHyperparameter
  from autosklearn.askl_typing import FEAT_TYPE_TYPE
  from autosklearn.pipeline.components.base import AutoSklearnRegressionAlgorithm, IterativeComponent
  from autosklearn.pipeline.constants import DENSE, PREDICTIONS, SPARSE, UNSIGNED_DATA
  from autosklearn.util.common import check_for_bool
label_desc: Use image node_id 4 for calling the SGD obj's underlying member method code with example usage: obj.iterative_fit(X, y, n_iter, refit) and returns: self