code: def _plot_qq(data: pd.Series = None, dist=stats.norm) -> go.Figure:
      """
  
      :param data:
      :param dist:
      :return:
      """
      # NOTE: plotly.tools.mpl_to_plotly not actively maintained, resulting in errors in the new version of matplotlib,
      # ref: https://github.com/plotly/plotly.py/issues/2913#issuecomment-730071567
      # removing plotly.tools.mpl_to_plotly for greater compatibility with matplotlib versions
      _plt_fig = sm.qqplot(
          data.dropna(), dist=dist, fit=True, line="45"
      )
      plt.close(_plt_fig)
      qqplot_data = _plt_fig.gca().lines
      fig = go.Figure()
  
      fig.add_trace(
          {
              "type": "scatter",
              "x": qqplot_data[0].get_xdata(),
              "y": qqplot_data[0].get_ydata(),
              "mode": "markers",
              "marker": {"color": "#19d3f3"},
          }
      )
  
      fig.add_trace(
          {
              "type": "scatter",
              "x": qqplot_data[1].get_xdata(),
              "y": qqplot_data[1].get_ydata(),
              "mode": "lines",
              "line": {"color": "#636efa"},
          }
      )
      del qqplot_data
      return fig
  
file_path: qlib/qlib/contrib/report/analysis_model/analysis_model_performance.py
imports: from functools import partial
  import pandas
  import plotly.graph_objs
  import statsmodels.api
  import matplotlib.pyplot
  from scipy import stats
  from typing import Sequence
  from qlib.typehint import Literal
  from ..graph import ScatterGraph, SubplotsGraph, BarGraph, HeatmapGraph
  from ..utils import guess_plotly_rangebreaks
label_desc: Use image node_id 2 for calling a global function with example usage: _plot_qq(data, dist) and returns: fig