code: def test_alarm(self):
      # alarm function returns the post-rule processed anomaly scores
      print("-" * 80)
      logger.info("test_alarm\n" + "-" * 80 + "\n")
      alarms = self.model.get_anomaly_label(self.vals_test)
      n_alarms = np.sum(alarms.to_pd().values != 0)
      logger.info(f"Alarms look like:\n{alarms[:5]}")
      logger.info(f"Number of alarms: {n_alarms}\n")
      scores = alarms.to_pd().values.flatten()
      logger.info("max score = " + str(max(scores)))
      logger.info("min score = " + str(min(scores)) + "\n")
      self.assertLessEqual(n_alarms, 6)
  
file_path: merlion/tests/anomaly/test_stat_threshold.py
imports: import logging
  from os.path import abspath, dirname, join
  import sys
  import unittest
  import numpy
  from merlion.models.anomaly.stat_threshold import StatThreshold, StatThresholdConfig
  from merlion.post_process.threshold import AggregateAlarms
  from merlion.utils.data_io import csv_to_time_series
label_desc: Use image node_id 3 for calling the TestStatThreshold obj's underlying member method code with example usage: obj.test_alarm() without return types