code: def setup_class(cls):
      super().setup_class()  # initialize DGP
  
      nobs = cls.nobs
      y_true, x, exog = cls.y_true, cls.x, cls.exog
  
      np.random.seed(8765993)
      sigma_noise = 0.1
      y = y_true + sigma_noise * np.random.randn(nobs)
  
      m = AdditiveModel(x)
      m.fit(y)
      res_gam = m.results  # TODO: currently attached to class
  
      res_ols = OLS(y, exog).fit()
  
      # Note: there still are some naming inconsistencies
      cls.res1 = res1 = Dummy()  # for gam model
      # res2 = Dummy() #for benchmark
      cls.res2 = (
          res2
      ) = res_ols  # reuse existing ols results, will add additional
  
      res1.y_pred = res_gam.predict(x)
      res2.y_pred = res_ols.model.predict(res_ols.params, exog)
      res1.y_predshort = res_gam.predict(x[:10])
  
      slopes = [i for ss in m.smoothers for i in ss.params[1:]]
  
      const = res_gam.alpha + sum([ss.params[1] for ss in m.smoothers])
      # print const, slopes
      res1.params = np.array([const] + slopes)
  
imports: from statsmodels.compat.python import lrange
  import numpy
  from numpy.testing import assert_almost_equal, assert_equal
  from scipy import stats
  import pytest
  from statsmodels.sandbox.gam import AdditiveModel
  from statsmodels.sandbox.gam import Model
  from statsmodels.genmod.families import family, links
  from statsmodels.genmod.generalized_linear_model import GLM
  from statsmodels.regression.linear_model import OLS
label_desc: Use image node_id 1 for calling the TestAdditiveModel obj's underlying member method code with example usage: obj.setup_class(cls) without return types