code: def qq_subplot(
      fig: go.Figure,
      data: pd.Series,
      row: int,
      col: int,
      name: Optional[str] = None,
  ) -> Tuple[go.Figure, List[matplotlib.lines.Line2D]]:
      """Function to add QQ plot to a Plotly subplot
  
      Parameters
      ----------
      fig : go.Figure
          Plotly figure to which the ACF needs to be added
      data : pd.Series
          Data whose ACF needs to be computed
      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.
      name : Optional[str], optional
          Name to show when hovering over plot, by default None
  
      Returns
      -------
      Tuple[go.Figure, List[matplotlib.lines.Line2D]]
          Returns back the plotly figure with QQ plot inserted along with the QQ
          plot data.
      """
      matplotlib.use("Agg")
      qqplot_data = qqplot(data, line="s")
      plt.close(qqplot_data)
      qqplot_data = qqplot_data.gca().lines
  
      name = name or data.name
  
      fig.add_trace(
          {
              "type": "scattergl",
              "x": qqplot_data[0].get_xdata(),
              "y": qqplot_data[0].get_ydata(),
              "mode": "markers",
              "marker": {"color": "#1f77b4"},
              "name": name,
          },
          row=row,
          col=col,
      )
  
      fig.add_trace(
          {
              "type": "scattergl",
              "x": qqplot_data[1].get_xdata(),
              "y": qqplot_data[1].get_ydata(),
              "mode": "lines",
              "line": {"color": "#3f3f3f"},
              "name": name,
          },
          row=row,
          col=col,
      )
      with fig.batch_update():
          fig.update_xaxes(
              title_text="Theoretical Quantities", row=row, col=col
          )
          fig.update_yaxes(
              title_text="Sample Quantities", row=row, col=col
          )
      return fig, qqplot_data
  
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 5 for calling a global function with example usage: qq_subplot(fig, data, row, col, name) and returns: fig,  qqplot_data