code: def test_mode_gaussian(self):
      sample_num = 500
      # actual value
      y_test = np.full(sample_num, 2)
      mu, sigma, ratio = 3, 0.1, 0.01
      s = np.random.normal(mu, sigma, sample_num)
      y_pred = y_test + s
  
      td = ThresholdDetector()
      td.set_params(mode="gaussian", ratio=ratio)
      td.fit(y_test, y_pred)
      # check estimated threshold
      from scipy.stats import norm
  
      assert (
          abs(td.pattern_th - (norm.ppf(1 - ratio) * sigma + mu)) < 0.04
      )
  
file_path: BigDL/python/chronos/test/bigdl/chronos/detector/anomaly/test_th_detector.py
imports: import pytest
  import numpy
  import pandas
  from unittest import TestCase
  from bigdl.chronos.utils import LazyImport
  from bigdl.chronos.detector.anomaly import ThresholdDetector
  from ...None import op_torch
label_desc: Use image node_id 7 for calling the TestThresholdDetector obj's underlying member method code with example usage: obj.test_mode_gaussian() without return types