code: def test_corner_cases(self):
      td = ThresholdDetector()
      with pytest.raises(RuntimeError):
          td.score()
      with pytest.raises(RuntimeError):
          td.anomaly_indexes()
  
      time = np.arange(0, 1, 0.5)
      y = np.sin(time)
      td.set_params(mode="dummy")
      with pytest.raises(ValueError):
          td.fit(y, y)
      td.set_params(mode="gaussian")
      with pytest.raises(ValueError):
          td.fit(y)
      td.set_params(threshold="1")
      with pytest.raises(ValueError):
          td.fit(y)
      td.set_params(threshold=(1, -1))
      with pytest.raises(ValueError):
          td.fit(y)
      td.set_params(threshold=(np.array([-1]), np.array([-1])))
      with pytest.raises(ValueError):
          td.fit(y)
      td.set_params(threshold=(np.array([1, 1]), np.array([-1, -1])))
      with pytest.raises(ValueError):
          td.fit(y)
  
file_path: analytics-zoo/pyzoo/test/zoo/chronos/detector/anomaly/test_th_detector.py
imports: import pytest
  import numpy
  import pandas
  from test.zoo.pipeline.utils.test_utils import ZooTestCase
  from zoo.chronos.forecaster.lstm_forecaster import LSTMForecaster
  from zoo.chronos.detector.anomaly import ThresholdDetector
label_desc: Use image node_id 10 for calling the TestThresholdDetector obj's underlying member method code with example usage: obj.test_corner_cases() without return types