code: def __init__(self, *args, **kwargs):
      super().__init__(*args, **kwargs)
      # Time series with anomalies in both train split and test split
      # We test training with labels here to also test the AdaptiveThreshold
      # post-rule
      torch.manual_seed(12345)
      df = pd.read_csv(
          join(
              rootdir,
              "data",
              "synthetic_anomaly",
              "horizontal_spike_anomaly.csv",
          )
      )
      df.timestamp = pd.to_datetime(df.timestamp, unit="s")
      df = df.set_index("timestamp")
  
      # Get training split
      train = df[: -len(df) // 2]
      self.train_data = TimeSeries.from_pd(train.iloc[:, 0])
      self.train_labels = TimeSeries.from_pd(train.anomaly)
  
      # Get testing split
      test = df[-len(df) // 2 :]
      self.test_data = TimeSeries.from_pd(test.iloc[:, 0])
      self.test_labels = TimeSeries.from_pd(test.anomaly)
  
      self.model = DeepPointAnomalyDetector(
          DeepPointAnomalyDetectorConfig(
              transform=TransformSequence(
                  [
                      TemporalResample("15min"),
                      Shingle(size=3, stride=2),
                      DifferenceTransform(),
                  ]
              )
          )
      )
  
file_path: merlion/tests/anomaly/test_dpad.py
imports: import logging
  from os.path import abspath, dirname, join
  import sys
  import unittest
  import numpy
  import pandas
  import torch
  from merlion.evaluate.anomaly import TSADMetric
  from merlion.models.anomaly.deep_point_anomaly_detector import DeepPointAnomalyDetector, DeepPointAnomalyDetectorConfig
  from merlion.transform.moving_average import DifferenceTransform
  from merlion.transform.resample import Shingle, TemporalResample
  from merlion.transform.sequence import TransformSequence
  from merlion.utils import TimeSeries
label_desc: Use image node_id 1 to create a new TestDPAD object from inherited base classes: unittest with example: obj = TestDPAD()