code: def test_pandas(self):
      res_add = seasonal_decompose(self.data, period=4)
      freq_override_data = self.data.copy()
      freq_override_data.index = pd.date_range(
          start="1/1/1951",
          periods=len(freq_override_data),
          freq=YEAR_END,
      )
      res_add_override = seasonal_decompose(
          freq_override_data, period=4
      )
  
      assert_almost_equal(
          res_add.seasonal.values.squeeze(), SEASONAL, 2
      )
      assert_almost_equal(res_add.trend.values.squeeze(), TREND, 2)
      assert_almost_equal(res_add.resid.values.squeeze(), RANDOM, 3)
      assert_almost_equal(
          res_add_override.seasonal.values.squeeze(), SEASONAL, 2
      )
      assert_almost_equal(
          res_add_override.trend.values.squeeze(), TREND, 2
      )
      assert_almost_equal(
          res_add_override.resid.values.squeeze(), RANDOM, 3
      )
      assert_equal(
          res_add.seasonal.index.values.squeeze(),
          self.data.index.values,
      )
  
      res_mult = seasonal_decompose(np.abs(self.data), "m", period=4)
      res_mult_override = seasonal_decompose(
          np.abs(freq_override_data), "m", period=4
      )
      assert_almost_equal(
          res_mult.seasonal.values.squeeze(), MULT_SEASONAL, 4
      )
      assert_almost_equal(
          res_mult.trend.values.squeeze(), MULT_TREND, 2
      )
      assert_almost_equal(
          res_mult.resid.values.squeeze(), MULT_RANDOM, 4
      )
      assert_almost_equal(
          res_mult_override.seasonal.values.squeeze(), MULT_SEASONAL, 4
      )
      assert_almost_equal(
          res_mult_override.trend.values.squeeze(), MULT_TREND, 2
      )
      assert_almost_equal(
          res_mult_override.resid.values.squeeze(), MULT_RANDOM, 4
      )
      assert_equal(
          res_mult.seasonal.index.values.squeeze(),
          self.data.index.values,
      )
  
imports: from statsmodels.compat.pandas import MONTH_END, QUARTER_END, YEAR_END
  import numpy
  from numpy.testing import assert_allclose, assert_almost_equal, assert_equal, assert_raises
  import pandas
  import pytest
  from statsmodels.tsa.seasonal import seasonal_decompose
label_desc: Use image node_id 3 for calling the TestDecompose obj's underlying member method code with example usage: obj.test_pandas() without return types