code: def __init__(
      self,
      y: TimeSeries = None,
      anom: TimeSeries = None,
      yhat: TimeSeries = None,
      yhat_lb: TimeSeries = None,
      yhat_ub: TimeSeries = None,
      y_prev: TimeSeries = None,
      yhat_prev: TimeSeries = None,
      yhat_prev_lb: TimeSeries = None,
      yhat_prev_ub: TimeSeries = None,
      yhat_color: str = None,
  ):
      assert y is not None, "`y` must be given"
  
      if yhat is None:
          assert (
              yhat_lb is None and yhat_ub is None
          ), "Can only give `yhat_lb` and `yhat_ub` if `yhat` is given"
      else:
          assert (yhat_lb is None and yhat_ub is None) or (
              yhat_lb is not None and yhat_ub is not None
          ), "Must give both or neither of `yhat_lb` and `yhat_ub`"
  
      if yhat_prev is None:
          assert (
              yhat_prev_lb is None and yhat_prev_ub is None
          ), "Can only give `yhat_prev_lb` and `yhat_prev_ub` if `yhat_prev` is given"
      else:
          assert (yhat_prev_lb is None and yhat_prev_ub is None) or (
              yhat_prev_lb is not None and yhat_prev_ub is not None
          ), "Must give both or neither of `yhat_prev_lb` and `yhat_prev_ub`"
  
      self.y = y
      self.anom = anom
      self.yhat = yhat
      self.yhat_lb = yhat_lb
      self.yhat_ub = yhat_ub
  
      self.y_prev = y_prev
      self.yhat_prev = yhat_prev
      self.yhat_prev_lb = yhat_prev_lb
      self.yhat_prev_ub = yhat_prev_ub
      self.yhat_color = (
          yhat_color if isinstance(yhat_color, str) else "#0072B2"
      )
  
imports: import logging
  from typing import Dict
  from copy import copy
  from matplotlib.colors import to_rgb
  from matplotlib.dates import AutoDateLocator, AutoDateFormatter
  import matplotlib.pyplot
  import numpy
  import pandas
  import plotly
  import plotly.graph_objects
  from plotly.subplots import make_subplots
  from merlion.utils import TimeSeries, UnivariateTimeSeries
label_desc: Use image node_id 1 to create a new MTSFigure object  with example: obj = MTSFigure(y, anom, yhat, yhat_lb, yhat_ub, y_prev, yhat_prev, yhat_prev_lb, yhat_prev_ub, yhat_color)