code: def test_detector():
      """Tests `Detector` class."""
      detector = Detector()
      assert detector.reward is not None
      assert detector.fit_info == {"param_full": None}
      detector.fit = lambda x: 30
      assert detector.fit(1) == 30
      assert detector.fit_info == {"param_full": None}
      assert detector.fitted_df is None
      assert detector.predict(data=None) is None
  
imports: import numpy
  import pandas
  import pytest
  from scipy import stats
  from greykite.common.constants import PREDICTED_ANOMALY_COL
  from greykite.common.viz.timeseries_annotate import plot_lines_markers
  from greykite.detection.common.ad_evaluation import f1_score
  from greykite.detection.detector.data import DetectorData
  from greykite.detection.detector.detector import Detector
  from greykite.detection.detector.detector import build_anomaly_percent_reward
  from greykite.detection.detector.optimizer import CalcResult
  from greykite.detection.detector.reward import Reward
label_desc: Use image node_id 2 for calling a global function with example usage: test_detector() without return types