code: def detect_trend_anomaly(y, th):
      threshold_min = np.full_like(y, fill_value=th[0])
      threshold_max = np.full_like(y, fill_value=th[1])
      return detect_trend_anomaly_arr(y, (threshold_min, threshold_max))
  
imports: import math
  import numpy
  from bigdl.chronos.detector.anomaly.abstract import AnomalyDetector
  from bigdl.nano.utils.common import invalidInputError
  from abc import ABC, abstractmethod
label_desc: Use image node_id 4 for calling a global function with example usage: detect_trend_anomaly(y, th) and returns: detect_trend_anomaly_arr