class_docstr: Applies basic post-filtering to a time series of anomaly scores
  
  1. Determine which points are anomalies by comparing the absolute value of
     their anomaly score to ``alm_threshold``
  2. Only fire an alarm when ``min_alm_in_window`` of points (within a window
     of ``alarm_window_minutes`` minutes) are labeled as anomalies.
  3. If there is an alarm, then all alarms for the next ``alm_suppress_minutes``
     minutes will be suppressed.
  
  Return a time series of filtered anomaly scores, where the only non-zero
  values are the anomaly scores which were marked as alarms (and not
  suppressed).
code: def train(
      self,
      anomaly_scores: TimeSeries,
      anomaly_labels: TimeSeries = None,
      metric: TSADMetric = None,
      unsup_quantile: float = None,
      max_early_sec=None,
      max_delay_sec=None,
      min_allowed_score=None,
  ) -> TimeSeries:
      if max_early_sec is None:
          max_early_sec = self.suppress_secs
      return self.threshold_class.train(
          self,
          anomaly_scores=anomaly_scores,
          anomaly_labels=anomaly_labels,
          metric=metric,
          unsup_quantile=unsup_quantile,
          max_early_sec=max_early_sec,
          max_delay_sec=max_delay_sec,
          min_allowed_score=min_allowed_score,
      )
  
imports: import bisect
  import logging
  import numpy
  from merlion.evaluate.anomaly import TSADMetric
  from merlion.post_process.base import PostRuleBase
  from merlion.utils import UnivariateTimeSeries, TimeSeries
label_desc: Use image node_id 10 for calling the AggregateAlarms obj's underlying member method code with example usage: obj.train(anomaly_scores, anomaly_labels, metric, unsup_quantile, max_early_sec, max_delay_sec, min_allowed_score) and returns: self