docstr: Test "diff percent threshold" algorithm with a threshold of 20%
docstr_tok: ["Test","``","diff","percent","threshold","''","algorithm","with","a","threshold","of","20","%"]
code: def test_diff_percent_threshold_algorithm(self):
      """
      Test "diff percent threshold" algorithm with a threshold of 20%
      """
      detector = AnomalyDetector(
          self.s1,
          baseline_time_series=self.s2,
          algorithm_name="diff_percent_threshold",
          algorithm_params={
              "percent_threshold_upper": 20,
              "percent_threshold_lower": -20,
          },
      )
      anomalies = detector.get_anomalies()
      self.assertTrue(anomalies is not None)
      self.assertTrue(len(anomalies) > 0)
      self.assertRaises(
          exceptions.RequiredParametersNotPassed,
          lambda: AnomalyDetector(
              self.s1,
              baseline_time_series=self.s2,
              algorithm_name="diff_percent_threshold",
          ),
      )
  
imports: import os
  import sys
  import unittest
  from luminol import exceptions
  from luminol.anomaly_detector import AnomalyDetector
  from luminol.modules.time_series import TimeSeries
  from luminol.algorithms.anomaly_detector_algorithms import AnomalyDetectorAlgorithm
label_desc: Use image node_id 3 for calling the TestAnomalyDetector obj's underlying member method code with example usage: obj.test_diff_percent_threshold_algorithm() without return types