code: def setup_class(cls):
      # from example wls.py
  
      nsample = 50
      x = np.linspace(0, 20, nsample)
      X = np.column_stack((x, (x - 5) ** 2))
      from statsmodels.tools.tools import add_constant
  
      X = add_constant(X)
      beta = [5.0, 0.5, -0.01]
      sig = 0.5
      w = np.ones(nsample)
      w[int(nsample * 6.0 / 10) :] = 3
      y_true = np.dot(X, beta)
      e = np.random.normal(size=nsample)
      y = y_true + sig * w * e
      X = X[:, [0, 1]]
  
      # ### WLS knowing the true variance ratio of heteroscedasticity
  
      mod_wls = WLS(y, X, weights=1.0 / w)
      cls.res_wls = mod_wls.fit()
  
file_path: statsmodels/statsmodels/regression/tests/test_predict.py
imports: import numpy
  from numpy.testing import assert_allclose, assert_equal
  import pandas
  from statsmodels.regression.linear_model import OLS, WLS
  from statsmodels.sandbox.regression.predstd import wls_prediction_std
  from statsmodels.regression._prediction import get_prediction
label_desc: Use image node_id 1 for calling the TestWLSPrediction obj's underlying member method code with example usage: obj.setup_class(cls) without return types