code: def fit(self, Y, rtol=1.0e-06, maxiter=30):
      self.rtol = rtol
      self.maxiter = maxiter
  
      self.Y = np.asarray(Y, np.float64)
  
      self.history = []
  
      # iter(self)
      self._iter__()
  
      # TODO code duplication with next?
      alpha = self.Y.mean()
      mu0 = self.family.starting_mu(Y)
      # Z = self.family.link(alpha) + self.family.link.deriv(alpha) * (Y - alpha)
      Z = self.family.link(alpha) + self.family.link.deriv(alpha) * (
          Y - mu0
      )
      m = AdditiveModel(
          self.exog, smoothers=self.smoothers, family=self.family
      )
      self.results = m.fit(Z)
      self.results.mu = self.family.link.inverse(
          self.results.predict(self.exog)
      )
      self.results.Y = Y
  
      while self.cont():
          self.results = self.next()
          self.scale = self.results.scale = self.estimate_scale()
  
      if self.iter >= self.maxiter:
          import warnings
  
          warnings.warn(iteration_limit_doc, IterationLimitWarning)
  
      return self.results
  
imports: import numpy
  from statsmodels.genmod import families
  from statsmodels.sandbox.nonparametric.smoothers import PolySmoother
  from statsmodels.genmod.generalized_linear_model import GLM
  from statsmodels.tools.sm_exceptions import IterationLimitWarning, iteration_limit_doc
  import warnings
label_desc: Use image node_id 4 for calling the Model obj's underlying member method code with example usage: obj.fit(Y, rtol, maxiter) and returns: self