code: def test_attribute(testCase):
      """Test fit_detect the detector."""
      s = pd.Series(
          testCase["s"],
          pd.date_range(
              start="2017-1-1", periods=len(testCase["s"]), freq="D"
          ),
      )
      model = testCase["model"]
      for key, value in testCase["a"].items():
          with pytest.raises(AttributeError):
              getattr(model, key)
      model.fit(s)
      for key, value in testCase["a"].items():
          if isinstance(value, list):
              pd.testing.assert_series_equal(
                  getattr(model, key),
                  pd.Series(value, index=s.index[: len(value)]),
                  check_dtype=False,
                  check_names=False,
              )
          else:
              assert getattr(model, key) == value
  
imports: import numpy
  import pandas
  import pytest
  import adtk.detector
label_desc: Use image node_id 1 for calling a global function with example usage: test_attribute(testCase) without return types