class_docstr: Wrapper to load a custom dataset for anomaly detection. Please review the `tutorial <tutorials/CustomDataset>`
  to get started.
class_docstr_tok: ["Wrapper","to","load","a","custom","dataset","for","anomaly","detection",".","Please","review","the","`","tutorial","<","tutorials\/CustomDataset",">","`","to","get","started","."]
code: def check_ts_for_metadata(self, ts, col):
      if col == "anomaly":
          if col not in ts:
              if self.assume_no_anomaly:
                  ts[col] = False
              else:
                  raise ValueError(
                      f"Time series {ts} does not have metadata column {col}."
                  )
          ts[col] = ts[col].astype(bool)
      else:
          ts = super().check_ts_for_metadata(ts, col)
      return ts
  
file_path: merlion/ts_datasets/ts_datasets/anomaly/custom.py
imports: import glob
  import logging
  import os
  import pandas
  from ts_datasets.forecast.custom import CustomDataset
  from ts_datasets.anomaly.base import TSADBaseDataset
label_desc: Use image node_id 3 for calling the CustomAnomalyDataset obj's underlying member method code with example usage: obj.check_ts_for_metadata(ts, col) and returns: ts