code: def test_supsmu():
      path_ss = "tslumen.profile._supsmu.SuperSmoother"
      path_ols = "tslumen.profile._supsmu.OLS"
  
      with mock.patch(path_ss, autospec=True) as smoother:
          with mock.patch(path_ols, autospec=True) as ols:
              ser = pd.Series([42] * 28)
              smoother.return_value.predict.return_value = (
                  ser * -1
              ).values
              ols.return_value.fit.return_value.predict.return_value = (
                  ser * 0
              ).values
              p = supsmu(ser).result
              assert isinstance(p, pd.DataFrame)
              assert smoother.call_count == 0
              assert ols.call_count == 2
              assert p.columns.tolist() == ["original", "supsmu"]
              assert p["original"].equals(ser)
              assert (p["supsmu"][:4].values == 0).all()
              assert (p["supsmu"][-4:].values == 0).all()
              assert (p["supsmu"][4:-4].values == 42).all()
  
      with mock.patch(path_ss, autospec=True) as smoother:
          ser = pd.Series(
              [-2, 3, -2, 3, -2, 3, -2, 3, -2, 3, -2, 3, -2, 3] * 8
          )
          smoother.return_value.predict.return_value = (ser * -1).values
          p = supsmu(ser).result
          assert isinstance(p, pd.DataFrame)
          assert smoother.call_count == 1
          assert p.columns.tolist() == ["original", "supsmu"]
          assert p["original"].equals(ser)
          assert p["supsmu"].equals(-1 * ser)
  
      with mock.patch(path_ss, autospec=True) as smoother:
          ser = pd.Series(
              [-2, 3, -2, 3, -2, 3, -2, 3, -2, 3, -2, 3, -2, 3] * 8
          )
          smoother.return_value.predict.return_value = (ser * -1).values
          p = supsmu(
              ser,
              alpha=0.1,
              period=2.2,
              primary_spans=(0.1, 0.8),
              middle_span=0.12,
              final_span=0.15,
          ).result
          assert isinstance(p, pd.DataFrame)
          assert smoother.call_count == 1
          assert smoother.call_args_list[0][1]["alpha"] == 0.1
          assert smoother.call_args_list[0][1]["period"] == 2.2
          assert smoother.call_args_list[0][1]["primary_spans"] == (
              0.1,
              0.8,
          )
          assert smoother.call_args_list[0][1]["middle_span"] == 0.12
          assert smoother.call_args_list[0][1]["final_span"] == 0.15
          assert p.columns.tolist() == ["original", "supsmu"]
          assert p["original"].equals(ser)
          assert p["supsmu"].equals(-1 * ser)
  
file_path: tslumen/tests/unit/profile/test_smooth.py
imports: import pytest
  import mock
  from tests.unit.profile.base import *
  from tslumen.profile.smooth import lowess, rolling_avg, supsmu
label_desc: Use image node_id 5 for calling a global function with example usage: test_supsmu() without return types