class_docstr: Simulates the live deployment of an anomaly detection model.
docstr: Initialize the model by training it on an initial set of train data.
  Simulate real-time anomaly detection by the model, while re-training it
  at the desired frequency.
  
  :param train_vals: initial training data
  :param test_vals: all data where we want to get the model's predictions
      and compare it to the ground truth
  :param exog_data: any exogenous data (only used for some models)
  :param train_kwargs: dict of keyword arguments we want to use for the
      initial training process. Typically, you will want to provide the
      key "anomaly_labels" here, if you have training data with labeled
      anomalies, as well as the key "post_rule_train_config", if you want
      to use a custom training config for the model's post-rule.
  :param retrain_kwargs: dict of keyword arguments we want to use for all
      subsequent retrainings. Typically, you will not supply any this
      argument.
  :param post_process: whether to apply the model's post-rule on the
      returned results.
  
  :return: ``(train_result, result)``. ``train_result`` is a `TimeSeries`
      of the model's anomaly scores on ``train_vals``. ``result`` is a
      `TimeSeries` of the model's anomaly scores on ``test_vals``.
code: def get_predict(
      self,
      train_vals: TimeSeries,
      test_vals: TimeSeries,
      exog_data: TimeSeries = None,
      train_kwargs: dict = None,
      retrain_kwargs: dict = None,
      post_process=True,
  ) -> Tuple[TimeSeries, TimeSeries]:
      """
      Initialize the model by training it on an initial set of train data.
      Simulate real-time anomaly detection by the model, while re-training it
      at the desired frequency.
  
      :param train_vals: initial training data
      :param test_vals: all data where we want to get the model's predictions
          and compare it to the ground truth
      :param exog_data: any exogenous data (only used for some models)
      :param train_kwargs: dict of keyword arguments we want to use for the
          initial training process. Typically, you will want to provide the
          key "anomaly_labels" here, if you have training data with labeled
          anomalies, as well as the key "post_rule_train_config", if you want
          to use a custom training config for the model's post-rule.
      :param retrain_kwargs: dict of keyword arguments we want to use for all
          subsequent retrainings. Typically, you will not supply any this
          argument.
      :param post_process: whether to apply the model's post-rule on the
          returned results.
  
      :return: ``(train_result, result)``. ``train_result`` is a `TimeSeries`
          of the model's anomaly scores on ``train_vals``. ``result`` is a
          `TimeSeries` of the model's anomaly scores on ``test_vals``.
      """
      train_result, result = super().get_predict(
          train_vals=train_vals,
          test_vals=test_vals,
          exog_data=exog_data,
          train_kwargs=train_kwargs,
          retrain_kwargs=retrain_kwargs,
      )
      if post_process:
          train_result = self.model.post_rule(train_result)
          result = (
              None if result is None else self.model.post_rule(result)
          )
      return train_result, result
  
imports: from bisect import bisect_left
  from enum import Enum
  from functools import partial
  from typing import Tuple, Union
  import numpy
  import pandas
  from merlion.evaluate.base import EvaluatorBase, EvaluatorConfig
  from merlion.utils import TimeSeries, UnivariateTimeSeries
  from merlion.utils.misc import call_with_accepted_kwargs
label_desc: Use image node_id 6 for calling the TSADEvaluator obj's underlying member method code with example usage: obj.get_predict(train_vals, test_vals, exog_data, train_kwargs, retrain_kwargs, post_process) and returns: train_result,  result