class_docstr: Config object for default anomaly detection model.
docstr: :param granularity: the granularity at which the input time series should
      be sampled, e.g. "5min", "1h", "1d", etc.
  :param n_threads: the number of parallel threads to use for relevant models
docstr_tok: [":","param","granularity",":","the","granularity","at","which","the","input","time","series","should","be","sampled",",","e.g",".","``","5min","''",",","``","1h","''",",","``","1d","''",",","etc",".",":","param","n_threads",":","the","number","of","parallel","threads","to","use","for","relevant","models"]
code: def __init__(
      self,
      model=None,
      granularity: str = None,
      n_threads: int = 1,
      **kwargs,
  ):
      """
      :param granularity: the granularity at which the input time series should
          be sampled, e.g. "5min", "1h", "1d", etc.
      :param n_threads: the number of parallel threads to use for relevant models
      """
      self.granularity = granularity
      self.n_threads = n_threads
      super().__init__(model=model, **kwargs)
      assert self.base_model is None or isinstance(
          self.base_model, DetectorBase
      )
  
imports: import logging
  from typing import Optional, Tuple
  from merlion.models.factory import ModelFactory
  from merlion.models.layers import LayeredDetector, LayeredForecaster, LayeredModelConfig
  from merlion.models.anomaly.base import DetectorBase
  from merlion.models.forecast.base import ForecasterBase
  from merlion.utils import TimeSeries
label_desc: Use image node_id 1 to create a new DefaultDetectorConfig object from inherited base classes: LayeredModelConfig with example: obj = DefaultDetectorConfig(model, granularity, n_threads)