code: def test_attributes(self):
      attributes_fit = [
          "params",
          "rsquared",
          "df_resid",
          "df_model",
          "llf",
          "aic",
          "bic"
          #'fittedvalues', 'resid'
      ]
      attributes_inference = ["bse", "tvalues", "pvalues"]
      import copy
  
      attributes = copy.copy(attributes_fit)
  
      if not getattr(self, "skip_inference", False):
          attributes.extend(attributes_inference)
  
      for att in attributes:
          r1 = getattr(self.res1, att)
          r2 = getattr(self.res2, att)
          if not np.size(r1) == 1:
              r1 = r1[: len(r2)]
  
          # check if we have overwritten tolerance
          rtol, atol = self.tol.get(att, self.tol["default"])
          message = "attribute: " + att  # + '\n%r\n\%r' % (r1, r2)
          assert_allclose(r1, r2, rtol=rtol, atol=atol, err_msg=message)
  
      # models are not close enough for some attributes at high precision
      assert_allclose(
          self.res1.fittedvalues,
          self.res1.fittedvalues,
          rtol=1e-3,
          atol=1e-4,
      )
      assert_allclose(
          self.res1.resid, self.res1.resid, rtol=1e-3, atol=1e-4
      )
  
imports: import os
  import numpy
  import pandas
  import pytest
  from numpy.testing import assert_allclose
  from statsmodels.regression.linear_model import OLS, GLS
  from statsmodels.sandbox.regression.penalized import TheilGLS
label_desc: Use image node_id 2 for calling the CheckEquivalenceMixin obj's underlying member method code with example usage: obj.test_attributes() without return types