code: def test_pandas(default_kwargs, robust):
      class_kwargs, _, _ = _to_class_kwargs(default_kwargs, robust)
      endog = pd.Series(class_kwargs["endog"], name="y")
      period = class_kwargs["period"]
      mod = STL(endog=endog, period=period)
      res = mod.fit()
      assert isinstance(res.trend, pd.Series)
      assert isinstance(res.seasonal, pd.Series)
      assert isinstance(res.resid, pd.Series)
      assert isinstance(res.weights, pd.Series)
  
imports: from statsmodels.compat.pandas import MONTH_END
  import os
  import pickle
  import numpy
  from numpy.testing import assert_allclose
  import pandas
  import pytest
  from statsmodels.datasets import co2
  from statsmodels.tsa.seasonal import STL, DecomposeResult
label_desc: Use image node_id 17 for calling a global function with example usage: test_pandas(default_kwargs, robust) without return types