code: def time_series_subplot(
      fig: go.Figure,
      data: pd.DataFrame,
      row: int,
      col: int,
      hoverinfo: Optional[str],
  ) -> go.Figure:
      """Function to add a single or multiple overlaid time series to a Plotly subplot
  
      Parameters
      ----------
      fig : go.Figure
          Plotly figure to which the time series needs to be added
      data : pd.DataFrame
          Time Series that needs to be added. If more than one column is present,
          then each column acts as a separate time series that needs to be overlaid.
      row : int
          Row of the figure where the plot needs to be inserted. Starts from 1.
      col : int
          Column of the figure where the plot needs to be inserted. Starts from 1.
      hoverinfo : Optional[str]
          Whether hoverinfo should be disabled or not. Options are same as plotly.
          e.g. "text" to display, "skip" or "none" to disable.
  
      Returns
      -------
      go.Figure
          Returns back the plotly figure with time series inserted
      """
      x = (
          data.index.to_timestamp()
          if isinstance(data.index, pd.PeriodIndex)
          else data.index
      )
  
      for i, col_name in enumerate(data.columns):
          color = DEFAULT_PLOTLY_COLORS[i % len(DEFAULT_PLOTLY_COLORS)]
          # If you add hoverinfo = "text", you must also add the hovertemplate, else no hoverinfo
          # gets displayed. OR alternately, leave it out and it gets plotted by default.
          if hoverinfo == "text":
              # Not specifying the hoverinfo will show it by default
              fig.add_trace(
                  go.Scattergl(
                      x=x,
                      y=data[col_name].values,
                      name=col_name,
                      mode="lines+markers",
                      line=dict(color=color, width=2),
                      marker=dict(color=color, size=5),
                  ),
                  row=row,
                  col=col,
              )
          else:
              # Disable hoverinfo
              fig.add_trace(
                  go.Scattergl(
                      x=x,
                      y=data[col_name].values,
                      name=col_name,
                      mode="lines+markers",
                      line=dict(width=2),
                      marker=dict(size=5),
                      hoverinfo=hoverinfo,
                  ),
                  row=row,
                  col=col,
              )
  
      return fig
  
imports: from math import ceil
  from typing import Any, Dict, List, Optional, Tuple, Union
  import matplotlib
  import matplotlib.pyplot
  import numpy
  import pandas
  import plotly.express
  import plotly.graph_objects
  import plotly.io
  from plotly.colors import DEFAULT_PLOTLY_COLORS
  from plotly.subplots import make_subplots
  from scipy.fft import fft, fftfreq
  from scipy.signal import periodogram
  from statsmodels.graphics.gofplots import qqplot
  from statsmodels.tsa.seasonal import STL, seasonal_decompose
  from statsmodels.tsa.stattools import acf, ccf, pacf
  from pycaret.internal.logging import get_logger
  from pycaret.utils.generic import _resolve_dict_keys
  from pycaret.utils.time_series import TSAllowedPlotDataTypes
label_desc: Use image node_id 1 for calling a global function with example usage: time_series_subplot(fig, data, row, col, hoverinfo) and returns: fig