code: def fit(self, X, y, exposure=None, weights=None):
          
          y, weights = self._exposure_to_weights(y, exposure, weights)
          return super(PoissonGAM, self).fit(X, y, weights)
docs: Fit the generalized additive model.
  
          Parameters
          ----------
          X : array-like, shape (n_samples, m_features)
              Training vectors, where n_samples is the number of samples
              and m_features is the number of features.
  
          y : array-like, shape (n_samples,)
              Target values (integers in classification, real numbers in
              regression)
              For classification, labels must correspond to classes.
  
          exposure : array-like shape (n_samples,) or None, default: None
              containing exposures
              if None, defaults to array of ones
  
          weights : array-like shape (n_samples,) or None, default: None
              containing sample weights
              if None, defaults to array of ones
  
          Returns
          -------
          self : object
              Returns fitted GAM object