class_docstr: Wrapper to load datasets found in the Numenta Anomaly Benchmark
  (https://github.com/numenta/NAB).
  
  The NAB contains a range of datasets and are categorized by their domains.
class_docstr_tok: ["Wrapper","to","load","datasets","found","in","the","Numenta","Anomaly","Benchmark","(","https",":","\/\/github.com\/numenta\/NAB",")",".","The","NAB","contains","a","range","of","datasets","and","are","categorized","by","their","domains","."]
code: def load_labels(datafile, label_list, freq):
      filename = "/".join(re.sub(r"\\", "/", datafile).split("/")[-2:])
      label_list = label_list[filename]
      labels = pd.DatetimeIndex([])
      for lp in label_list:
          start = pd.to_datetime(lp[0])
          end = pd.to_datetime(lp[1])
          labels = labels.append(
              pd.date_range(start=start, end=end, freq=freq)
          )
      return labels
  
file_path: merlion/ts_datasets/ts_datasets/anomaly/nab.py
imports: import datetime
  import glob
  import json
  import logging
  import os
  import re
  import requests
  import numpy
  import pandas
  import tqdm
  from ts_datasets.anomaly.base import TSADBaseDataset
label_desc: Use image node_id 2 for calling the NAB obj's underlying member method code with example usage: obj.load_labels(datafile, label_list, freq) and returns: labels